HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/base.komma.pro/node_modules/@sentry/browser/build/bundle.es6.js.map
{"version":3,"file":"bundle.es6.js","sources":["../../types/src/loglevel.ts","../../types/src/severity.ts","../../types/src/status.ts","../../utils/src/async.ts","../../utils/src/polyfill.ts","../../utils/src/error.ts","../../utils/src/is.ts","../../utils/src/string.ts","../../utils/src/misc.ts","../../utils/src/logger.ts","../../utils/src/memo.ts","../../utils/src/object.ts","../../utils/src/path.ts","../../utils/src/syncpromise.ts","../../utils/src/promisebuffer.ts","../../utils/src/supports.ts","../../utils/src/instrument.ts","../../utils/src/dsn.ts","../../hub/src/scope.ts","../../hub/src/hub.ts","../../minimal/src/index.ts","../../core/src/api.ts","../../core/src/integration.ts","../../core/src/baseclient.ts","../../core/src/transports/noop.ts","../../core/src/basebackend.ts","../../core/src/request.ts","../../core/src/sdk.ts","../../core/src/integrations/functiontostring.ts","../../core/src/integrations/inboundfilters.ts","../src/tracekit.ts","../src/parsers.ts","../src/eventbuilder.ts","../src/transports/base.ts","../src/transports/fetch.ts","../src/transports/xhr.ts","../src/backend.ts","../src/helpers.ts","../src/integrations/globalhandlers.ts","../src/integrations/trycatch.ts","../src/integrations/breadcrumbs.ts","../src/integrations/linkederrors.ts","../src/integrations/useragent.ts","../src/version.ts","../src/client.ts","../src/sdk.ts","../src/index.ts"],"sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n  /** No logs will be generated. */\n  None = 0,\n  /** Only SDK internal errors will be logged. */\n  Error = 1,\n  /** Information useful for debugging the SDK will be logged. */\n  Debug = 2,\n  /** All SDK actions will be logged. */\n  Verbose = 3,\n}\n","/** JSDoc */\nexport enum Severity {\n  /** JSDoc */\n  Fatal = 'fatal',\n  /** JSDoc */\n  Error = 'error',\n  /** JSDoc */\n  Warning = 'warning',\n  /** JSDoc */\n  Log = 'log',\n  /** JSDoc */\n  Info = 'info',\n  /** JSDoc */\n  Debug = 'debug',\n  /** JSDoc */\n  Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n  /**\n   * Converts a string-based level into a {@link Severity}.\n   *\n   * @param level string representation of Severity\n   * @returns Severity\n   */\n  export function fromString(level: string): Severity {\n    switch (level) {\n      case 'debug':\n        return Severity.Debug;\n      case 'info':\n        return Severity.Info;\n      case 'warn':\n      case 'warning':\n        return Severity.Warning;\n      case 'error':\n        return Severity.Error;\n      case 'fatal':\n        return Severity.Fatal;\n      case 'critical':\n        return Severity.Critical;\n      case 'log':\n      default:\n        return Severity.Log;\n    }\n  }\n}\n","/** The status of an event. */\nexport enum Status {\n  /** The status could not be determined. */\n  Unknown = 'unknown',\n  /** The event was skipped due to configuration or callbacks. */\n  Skipped = 'skipped',\n  /** The event was sent to Sentry successfully. */\n  Success = 'success',\n  /** The client is currently rate limited and will try again later. */\n  RateLimit = 'rate_limit',\n  /** The event could not be processed. */\n  Invalid = 'invalid',\n  /** A server-side error ocurred during submission. */\n  Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n  /**\n   * Converts a HTTP status code into a {@link Status}.\n   *\n   * @param code The HTTP response status code.\n   * @returns The send status or {@link Status.Unknown}.\n   */\n  export function fromHttpCode(code: number): Status {\n    if (code >= 200 && code < 300) {\n      return Status.Success;\n    }\n\n    if (code === 429) {\n      return Status.RateLimit;\n    }\n\n    if (code >= 400 && code < 500) {\n      return Status.Invalid;\n    }\n\n    if (code >= 500) {\n      return Status.Failed;\n    }\n\n    return Status.Unknown;\n  }\n}\n","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\nexport function forget(promise: PromiseLike<any>): void {\n  promise.then(null, e => {\n    // TODO: Use a better logging mechanism\n    console.error(e);\n  });\n}\n","export const setPrototypeOf =\n  Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf<TTarget extends object, TProto>(obj: TTarget, proto: TProto): TTarget & TProto {\n  // @ts-ignore\n  obj.__proto__ = proto;\n  return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties<TTarget extends object, TProto>(obj: TTarget, proto: TProto): TTarget & TProto {\n  for (const prop in proto) {\n    if (!obj.hasOwnProperty(prop)) {\n      // @ts-ignore\n      obj[prop] = proto[prop];\n    }\n  }\n\n  return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n  /** Display name of this error instance. */\n  public name: string;\n\n  public constructor(public message: string) {\n    super(message);\n\n    // tslint:disable:no-unsafe-any\n    this.name = new.target.prototype.constructor.name;\n    setPrototypeOf(this, new.target.prototype);\n  }\n}\n","/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: any): boolean {\n  switch (Object.prototype.toString.call(wat)) {\n    case '[object Error]':\n      return true;\n    case '[object Exception]':\n      return true;\n    case '[object DOMException]':\n      return true;\n    default:\n      return isInstanceOf(wat, Error);\n  }\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: any): boolean {\n  return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: any): boolean {\n  return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: any): boolean {\n  return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: any): boolean {\n  return Object.prototype.toString.call(wat) === '[object String]';\n}\n\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: any): boolean {\n  return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: any): boolean {\n  return Object.prototype.toString.call(wat) === '[object Object]';\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: any): boolean {\n  // tslint:disable-next-line:strict-type-predicates\n  return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: any): boolean {\n  // tslint:disable-next-line:strict-type-predicates\n  return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: any): boolean {\n  return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): boolean {\n  // tslint:disable:no-unsafe-any\n  return Boolean(wat && wat.then && typeof wat.then === 'function');\n  // tslint:enable:no-unsafe-any\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: any): boolean {\n  // tslint:disable-next-line:no-unsafe-any\n  return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n  try {\n    // tslint:disable-next-line:no-unsafe-any\n    return wat instanceof base;\n  } catch (_e) {\n    return false;\n  }\n}\n","import { isRegExp, isString } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n  // tslint:disable-next-line:strict-type-predicates\n  if (typeof str !== 'string' || max === 0) {\n    return str;\n  }\n  return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line: string, colno: number): string {\n  let newLine = line;\n  const ll = newLine.length;\n  if (ll <= 150) {\n    return newLine;\n  }\n  if (colno > ll) {\n    colno = ll; // tslint:disable-line:no-parameter-reassignment\n  }\n\n  let start = Math.max(colno - 60, 0);\n  if (start < 5) {\n    start = 0;\n  }\n\n  let end = Math.min(start + 140, ll);\n  if (end > ll - 5) {\n    end = ll;\n  }\n  if (end === ll) {\n    start = Math.max(end - 140, 0);\n  }\n\n  newLine = newLine.slice(start, end);\n  if (start > 0) {\n    newLine = `'{snip} ${newLine}`;\n  }\n  if (end < ll) {\n    newLine += ' {snip}';\n  }\n\n  return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: any[], delimiter?: string): string {\n  if (!Array.isArray(input)) {\n    return '';\n  }\n\n  const output = [];\n  // tslint:disable-next-line:prefer-for-of\n  for (let i = 0; i < input.length; i++) {\n    const value = input[i];\n    try {\n      output.push(String(value));\n    } catch (e) {\n      output.push('[value cannot be serialized]');\n    }\n  }\n\n  return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n  if (!isString(value)) {\n    return false;\n  }\n\n  if (isRegExp(pattern)) {\n    return (pattern as RegExp).test(value);\n  }\n  if (typeof pattern === 'string') {\n    return value.indexOf(pattern) !== -1;\n  }\n  return false;\n}\n","import { Event, Integration, StackFrame, WrappedFunction } from '@sentry/types';\n\nimport { isString } from './is';\nimport { snipLine } from './string';\n\n/** Internal */\ninterface SentryGlobal {\n  Sentry?: {\n    Integrations?: Integration[];\n  };\n  SENTRY_ENVIRONMENT?: string;\n  SENTRY_DSN?: string;\n  SENTRY_RELEASE?: {\n    id?: string;\n  };\n  __SENTRY__: {\n    globalEventProcessors: any;\n    hub: any;\n    logger: any;\n  };\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod: any, request: string): any {\n  // tslint:disable-next-line: no-unsafe-any\n  return mod.require(request);\n}\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n  // tslint:disable:strict-type-predicates\n  return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject<T>(): T & SentryGlobal {\n  return (isNodeEnv()\n    ? global\n    : typeof window !== 'undefined'\n    ? window\n    : typeof self !== 'undefined'\n    ? self\n    : fallbackGlobalObject) as T & SentryGlobal;\n}\n// tslint:enable:strict-type-predicates\n\n/**\n * Extended Window interface that allows for Crypto API usage in IE browsers\n */\ninterface MsCryptoWindow extends Window {\n  msCrypto?: Crypto;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n  const global = getGlobalObject() as MsCryptoWindow;\n  const crypto = global.crypto || global.msCrypto;\n\n  if (!(crypto === void 0) && crypto.getRandomValues) {\n    // Use window.crypto API if available\n    const arr = new Uint16Array(8);\n    crypto.getRandomValues(arr);\n\n    // set 4 in byte 7\n    // tslint:disable-next-line:no-bitwise\n    arr[3] = (arr[3] & 0xfff) | 0x4000;\n    // set 2 most significant bits of byte 9 to '10'\n    // tslint:disable-next-line:no-bitwise\n    arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n    const pad = (num: number): string => {\n      let v = num.toString(16);\n      while (v.length < 4) {\n        v = `0${v}`;\n      }\n      return v;\n    };\n\n    return (\n      pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])\n    );\n  }\n  // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n  return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n    // tslint:disable-next-line:no-bitwise\n    const r = (Math.random() * 16) | 0;\n    // tslint:disable-next-line:no-bitwise\n    const v = c === 'x' ? r : (r & 0x3) | 0x8;\n    return v.toString(16);\n  });\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(\n  url: string,\n): {\n  host?: string;\n  path?: string;\n  protocol?: string;\n  relative?: string;\n} {\n  if (!url) {\n    return {};\n  }\n\n  const match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n  if (!match) {\n    return {};\n  }\n\n  // coerce to undefined values to empty string so we don't get 'undefined'\n  const query = match[6] || '';\n  const fragment = match[8] || '';\n  return {\n    host: match[4],\n    path: match[5],\n    protocol: match[2],\n    relative: match[5] + query + fragment, // everything minus origin\n  };\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n  if (event.message) {\n    return event.message;\n  }\n  if (event.exception && event.exception.values && event.exception.values[0]) {\n    const exception = event.exception.values[0];\n\n    if (exception.type && exception.value) {\n      return `${exception.type}: ${exception.value}`;\n    }\n    return exception.type || exception.value || event.event_id || '<unknown>';\n  }\n  return event.event_id || '<unknown>';\n}\n\n/** JSDoc */\ninterface ExtensibleConsole extends Console {\n  [key: string]: any;\n}\n\n/** JSDoc */\nexport function consoleSandbox(callback: () => any): any {\n  const global = getGlobalObject<Window>();\n  const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n  if (!('console' in global)) {\n    return callback();\n  }\n\n  const originalConsole = global.console as ExtensibleConsole;\n  const wrappedLevels: { [key: string]: any } = {};\n\n  // Restore all wrapped console methods\n  levels.forEach(level => {\n    if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {\n      wrappedLevels[level] = originalConsole[level] as WrappedFunction;\n      originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;\n    }\n  });\n\n  // Perform callback manipulations\n  const result = callback();\n\n  // Revert restoration to wrapped state\n  Object.keys(wrappedLevels).forEach(level => {\n    originalConsole[level] = wrappedLevels[level];\n  });\n\n  return result;\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n  event.exception = event.exception || {};\n  event.exception.values = event.exception.values || [];\n  event.exception.values[0] = event.exception.values[0] || {};\n  event.exception.values[0].value = event.exception.values[0].value || value || '';\n  event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(\n  event: Event,\n  mechanism: {\n    [key: string]: any;\n  } = {},\n): void {\n  // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n  try {\n    // @ts-ignore\n    // tslint:disable:no-non-null-assertion\n    event.exception!.values![0].mechanism = event.exception!.values![0].mechanism || {};\n    Object.keys(mechanism).forEach(key => {\n      // @ts-ignore\n      event.exception!.values![0].mechanism[key] = mechanism[key];\n    });\n  } catch (_oO) {\n    // no-empty\n  }\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n  try {\n    return document.location.href;\n  } catch (oO) {\n    return '';\n  }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown): string {\n  type SimpleNode = {\n    parentNode: SimpleNode;\n  } | null;\n\n  // try/catch both:\n  // - accessing event.target (see getsentry/raven-js#838, #768)\n  // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n  // - can throw an exception in some circumstances.\n  try {\n    let currentElem = elem as SimpleNode;\n    const MAX_TRAVERSE_HEIGHT = 5;\n    const MAX_OUTPUT_LEN = 80;\n    const out = [];\n    let height = 0;\n    let len = 0;\n    const separator = ' > ';\n    const sepLength = separator.length;\n    let nextStr;\n\n    while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n      nextStr = _htmlElementAsString(currentElem);\n      // bail out if\n      // - nextStr is the 'html' element\n      // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n      //   (ignore this limit if we are on the first iteration)\n      if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n        break;\n      }\n\n      out.push(nextStr);\n\n      len += nextStr.length;\n      currentElem = currentElem.parentNode;\n    }\n\n    return out.reverse().join(separator);\n  } catch (_oO) {\n    return '<unknown>';\n  }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown): string {\n  const elem = el as {\n    getAttribute(key: string): string; // tslint:disable-line:completed-docs\n    tagName?: string;\n    id?: string;\n    className?: string;\n  };\n\n  const out = [];\n  let className;\n  let classes;\n  let key;\n  let attr;\n  let i;\n\n  if (!elem || !elem.tagName) {\n    return '';\n  }\n\n  out.push(elem.tagName.toLowerCase());\n  if (elem.id) {\n    out.push(`#${elem.id}`);\n  }\n\n  className = elem.className;\n  if (className && isString(className)) {\n    classes = className.split(/\\s+/);\n    for (i = 0; i < classes.length; i++) {\n      out.push(`.${classes[i]}`);\n    }\n  }\n  const attrWhitelist = ['type', 'name', 'title', 'alt'];\n  for (i = 0; i < attrWhitelist.length; i++) {\n    key = attrWhitelist[i];\n    attr = elem.getAttribute(key);\n    if (attr) {\n      out.push(`[${key}=\"${attr}\"]`);\n    }\n  }\n  return out.join('');\n}\n\nconst INITIAL_TIME = Date.now();\nlet prevNow = 0;\n\n/**\n * Cross platform compatible partial performance implementation\n */\ninterface CrossPlatformPerformance {\n  /**\n   * Returns the current timestamp in ms\n   */\n  now(): number;\n  timeOrigin: number;\n}\n\nconst performanceFallback: CrossPlatformPerformance = {\n  now(): number {\n    let now = Date.now() - INITIAL_TIME;\n    if (now < prevNow) {\n      now = prevNow;\n    }\n    prevNow = now;\n    return now;\n  },\n  timeOrigin: INITIAL_TIME,\n};\n\nexport const crossPlatformPerformance: CrossPlatformPerformance = (() => {\n  if (isNodeEnv()) {\n    try {\n      const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: CrossPlatformPerformance };\n      return perfHooks.performance;\n    } catch (_) {\n      return performanceFallback;\n    }\n  }\n\n  if (getGlobalObject<Window>().performance) {\n    // Polyfill for performance.timeOrigin.\n    //\n    // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n    // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n    // tslint:disable-next-line:strict-type-predicates\n    if (performance.timeOrigin === undefined) {\n      // As of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always a\n      // valid fallback. In the absence of a initial time provided by the browser, fallback to INITIAL_TIME.\n      // @ts-ignore\n      // tslint:disable-next-line:deprecation\n      performance.timeOrigin = (performance.timing && performance.timing.navigationStart) || INITIAL_TIME;\n    }\n  }\n\n  return getGlobalObject<Window>().performance || performanceFallback;\n})();\n\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs(): number {\n  return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\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-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n  major?: number;\n  minor?: number;\n  patch?: number;\n  prerelease?: string;\n  buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n  const match = input.match(SEMVER_REGEXP) || [];\n  const major = parseInt(match[1], 10);\n  const minor = parseInt(match[2], 10);\n  const patch = parseInt(match[3], 10);\n  return {\n    buildmetadata: match[5],\n    major: isNaN(major) ? undefined : major,\n    minor: isNaN(minor) ? undefined : minor,\n    patch: isNaN(patch) ? undefined : patch,\n    prerelease: match[4],\n  };\n}\n\nconst defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now: number, header?: string | number | null): number {\n  if (!header) {\n    return defaultRetryAfter;\n  }\n\n  const headerDelay = parseInt(`${header}`, 10);\n  if (!isNaN(headerDelay)) {\n    return headerDelay * 1000;\n  }\n\n  const headerDate = Date.parse(`${header}`);\n  if (!isNaN(headerDate)) {\n    return headerDate - now;\n  }\n\n  return defaultRetryAfter;\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n  try {\n    if (!fn || typeof fn !== 'function') {\n      return defaultFunctionName;\n    }\n    return fn.name || defaultFunctionName;\n  } catch (e) {\n    // Just accessing custom props in some Selenium environments\n    // can cause a \"Permission denied\" exception (see raven-js#495).\n    return defaultFunctionName;\n  }\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n  const lineno = frame.lineno || 0;\n  const maxLines = lines.length;\n  const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n  frame.pre_context = lines\n    .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n    .map((line: string) => snipLine(line, 0));\n\n  frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n  frame.post_context = lines\n    .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n    .map((line: string) => snipLine(line, 0));\n}\n","import { consoleSandbox, getGlobalObject } from './misc';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject<Window | NodeJS.Global>();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** JSDoc */\nclass Logger {\n  /** JSDoc */\n  private _enabled: boolean;\n\n  /** JSDoc */\n  public constructor() {\n    this._enabled = false;\n  }\n\n  /** JSDoc */\n  public disable(): void {\n    this._enabled = false;\n  }\n\n  /** JSDoc */\n  public enable(): void {\n    this._enabled = true;\n  }\n\n  /** JSDoc */\n  public log(...args: any[]): void {\n    if (!this._enabled) {\n      return;\n    }\n    consoleSandbox(() => {\n      global.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console\n    });\n  }\n\n  /** JSDoc */\n  public warn(...args: any[]): void {\n    if (!this._enabled) {\n      return;\n    }\n    consoleSandbox(() => {\n      global.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console\n    });\n  }\n\n  /** JSDoc */\n  public error(...args: any[]): void {\n    if (!this._enabled) {\n      return;\n    }\n    consoleSandbox(() => {\n      global.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console\n    });\n  }\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nconst logger = (global.__SENTRY__.logger as Logger) || (global.__SENTRY__.logger = new Logger());\n\nexport { logger };\n","// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n  /** Determines if WeakSet is available */\n  private readonly _hasWeakSet: boolean;\n  /** Either WeakSet or Array */\n  private readonly _inner: any;\n\n  public constructor() {\n    // tslint:disable-next-line\n    this._hasWeakSet = typeof WeakSet === 'function';\n    this._inner = this._hasWeakSet ? new WeakSet() : [];\n  }\n\n  /**\n   * Sets obj to remember.\n   * @param obj Object to remember\n   */\n  public memoize(obj: any): boolean {\n    if (this._hasWeakSet) {\n      if (this._inner.has(obj)) {\n        return true;\n      }\n      this._inner.add(obj);\n      return false;\n    }\n    // tslint:disable-next-line:prefer-for-of\n    for (let i = 0; i < this._inner.length; i++) {\n      const value = this._inner[i];\n      if (value === obj) {\n        return true;\n      }\n    }\n    this._inner.push(obj);\n    return false;\n  }\n\n  /**\n   * Removes object from internal storage.\n   * @param obj Object to forget\n   */\n  public unmemoize(obj: any): void {\n    if (this._hasWeakSet) {\n      this._inner.delete(obj);\n    } else {\n      for (let i = 0; i < this._inner.length; i++) {\n        if (this._inner[i] === obj) {\n          this._inner.splice(i, 1);\n          break;\n        }\n      }\n    }\n  }\n}\n","import { ExtendedError, WrappedFunction } from '@sentry/types';\n\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacement: (...args: any[]) => any): void {\n  if (!(name in source)) {\n    return;\n  }\n\n  const original = source[name] as () => any;\n  const wrapped = replacement(original) as WrappedFunction;\n\n  // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n  // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n  // tslint:disable-next-line:strict-type-predicates\n  if (typeof wrapped === 'function') {\n    try {\n      wrapped.prototype = wrapped.prototype || {};\n      Object.defineProperties(wrapped, {\n        __sentry_original__: {\n          enumerable: false,\n          value: original,\n        },\n      });\n    } catch (_Oo) {\n      // This can throw if multiple fill happens on a global object like XMLHttpRequest\n      // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n    }\n  }\n\n  source[name] = wrapped;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n  return Object.keys(object)\n    .map(\n      // tslint:disable-next-line:no-unsafe-any\n      key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`,\n    )\n    .join('&');\n}\n\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(\n  value: any,\n): {\n  [key: string]: any;\n} {\n  if (isError(value)) {\n    const error = value as ExtendedError;\n    const err: {\n      stack: string | undefined;\n      message: string;\n      name: string;\n      [key: string]: any;\n    } = {\n      message: error.message,\n      name: error.name,\n      stack: error.stack,\n    };\n\n    for (const i in error) {\n      if (Object.prototype.hasOwnProperty.call(error, i)) {\n        err[i] = error[i];\n      }\n    }\n\n    return err;\n  }\n\n  if (isEvent(value)) {\n    /**\n     * Event-like interface that's usable in browser and node\n     */\n    interface SimpleEvent {\n      [key: string]: unknown;\n      type: string;\n      target?: unknown;\n      currentTarget?: unknown;\n    }\n\n    const event = value as SimpleEvent;\n\n    const source: {\n      [key: string]: any;\n    } = {};\n\n    source.type = event.type;\n\n    // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n    try {\n      source.target = isElement(event.target)\n        ? htmlTreeAsString(event.target)\n        : Object.prototype.toString.call(event.target);\n    } catch (_oO) {\n      source.target = '<unknown>';\n    }\n\n    try {\n      source.currentTarget = isElement(event.currentTarget)\n        ? htmlTreeAsString(event.currentTarget)\n        : Object.prototype.toString.call(event.currentTarget);\n    } catch (_oO) {\n      source.currentTarget = '<unknown>';\n    }\n\n    // tslint:disable-next-line:strict-type-predicates\n    if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n      source.detail = event.detail;\n    }\n\n    for (const i in event) {\n      if (Object.prototype.hasOwnProperty.call(event, i)) {\n        source[i] = event;\n      }\n    }\n\n    return source;\n  }\n\n  return value as {\n    [key: string]: any;\n  };\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n  // tslint:disable-next-line:no-bitwise\n  return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\nfunction jsonSize(value: any): number {\n  return utf8Length(JSON.stringify(value));\n}\n\n/** JSDoc */\nexport function normalizeToSize<T>(\n  object: { [key: string]: any },\n  // Default Node.js REPL depth\n  depth: number = 3,\n  // 100kB, as 200kB is max payload size, so half sounds reasonable\n  maxSize: number = 100 * 1024,\n): T {\n  const serialized = normalize(object, depth);\n\n  if (jsonSize(serialized) > maxSize) {\n    return normalizeToSize(object, depth - 1, maxSize);\n  }\n\n  return serialized as T;\n}\n\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value: any): any {\n  const type = Object.prototype.toString.call(value);\n\n  // Node.js REPL notation\n  if (typeof value === 'string') {\n    return value;\n  }\n  if (type === '[object Object]') {\n    return '[Object]';\n  }\n  if (type === '[object Array]') {\n    return '[Array]';\n  }\n\n  const normalized = normalizeValue(value);\n  return isPrimitive(normalized) ? normalized : type;\n}\n\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue<T>(value: T, key?: any): T | string {\n  if (key === 'domain' && value && typeof value === 'object' && ((value as unknown) as { _events: any })._events) {\n    return '[Domain]';\n  }\n\n  if (key === 'domainEmitter') {\n    return '[DomainEmitter]';\n  }\n\n  if (typeof (global as any) !== 'undefined' && (value as unknown) === global) {\n    return '[Global]';\n  }\n\n  if (typeof (window as any) !== 'undefined' && (value as unknown) === window) {\n    return '[Window]';\n  }\n\n  if (typeof (document as any) !== 'undefined' && (value as unknown) === document) {\n    return '[Document]';\n  }\n\n  // React's SyntheticEvent thingy\n  if (isSyntheticEvent(value)) {\n    return '[SyntheticEvent]';\n  }\n\n  // tslint:disable-next-line:no-tautology-expression\n  if (typeof value === 'number' && value !== value) {\n    return '[NaN]';\n  }\n\n  if (value === void 0) {\n    return '[undefined]';\n  }\n\n  if (typeof value === 'function') {\n    return `[Function: ${getFunctionName(value)}]`;\n  }\n\n  return value;\n}\n\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key: string, value: any, depth: number = +Infinity, memo: Memo = new Memo()): any {\n  // If we reach the maximum depth, serialize whatever has left\n  if (depth === 0) {\n    return serializeValue(value);\n  }\n\n  // If value implements `toJSON` method, call it and return early\n  // tslint:disable:no-unsafe-any\n  if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n    return value.toJSON();\n  }\n  // tslint:enable:no-unsafe-any\n\n  // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n  const normalized = normalizeValue(value, key);\n  if (isPrimitive(normalized)) {\n    return normalized;\n  }\n\n  // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n  const source = getWalkSource(value);\n\n  // Create an accumulator that will act as a parent for all future itterations of that branch\n  const acc = Array.isArray(value) ? [] : {};\n\n  // If we already walked that branch, bail out, as it's circular reference\n  if (memo.memoize(value)) {\n    return '[Circular ~]';\n  }\n\n  // Walk all keys of the source\n  for (const innerKey in source) {\n    // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n    if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n      continue;\n    }\n    // Recursively walk through all the child nodes\n    (acc as { [key: string]: any })[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n  }\n\n  // Once walked through all the branches, remove the parent from memo storage\n  memo.unmemoize(value);\n\n  // Return accumulated values\n  return acc;\n}\n\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input: any, depth?: number): any {\n  try {\n    // tslint:disable-next-line:no-unsafe-any\n    return JSON.parse(JSON.stringify(input, (key: string, value: any) => walk(key, value, depth)));\n  } catch (_oO) {\n    return '**non-serializable**';\n  }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: any, maxLength: number = 40): string {\n  // tslint:disable:strict-type-predicates\n  const keys = Object.keys(getWalkSource(exception));\n  keys.sort();\n\n  if (!keys.length) {\n    return '[object has no keys]';\n  }\n\n  if (keys[0].length >= maxLength) {\n    return truncate(keys[0], maxLength);\n  }\n\n  for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n    const serialized = keys.slice(0, includedKeys).join(', ');\n    if (serialized.length > maxLength) {\n      continue;\n    }\n    if (includedKeys === keys.length) {\n      return serialized;\n    }\n    return truncate(serialized, maxLength);\n  }\n\n  return '';\n}\n\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys<T>(val: T): T {\n  if (isPlainObject(val)) {\n    const obj = val as { [key: string]: any };\n    const rv: { [key: string]: any } = {};\n    for (const key of Object.keys(obj)) {\n      if (typeof obj[key] !== 'undefined') {\n        rv[key] = dropUndefinedKeys(obj[key]);\n      }\n    }\n    return rv as T;\n  }\n\n  if (Array.isArray(val)) {\n    return val.map(dropUndefinedKeys) as any;\n  }\n\n  return val;\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n  // if the path tries to go above the root, `up` ends up > 0\n  let up = 0;\n  for (let i = parts.length - 1; i >= 0; i--) {\n    const last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n  const parts = splitPathRe.exec(filename);\n  return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n  let resolvedPath = '';\n  let resolvedAbsolute = false;\n\n  for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    const path = i >= 0 ? args[i] : '/';\n\n    // Skip empty entries\n    if (!path) {\n      continue;\n    }\n\n    resolvedPath = `${path}/${resolvedPath}`;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(resolvedPath.split('/').filter(p => !!p), !resolvedAbsolute).join('/');\n\n  return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n  let start = 0;\n  for (; start < arr.length; start++) {\n    if (arr[start] !== '') {\n      break;\n    }\n  }\n\n  let end = arr.length - 1;\n  for (; end >= 0; end--) {\n    if (arr[end] !== '') {\n      break;\n    }\n  }\n\n  if (start > end) {\n    return [];\n  }\n  return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n  // tslint:disable:no-parameter-reassignment\n  from = resolve(from).substr(1);\n  to = resolve(to).substr(1);\n\n  const fromParts = trim(from.split('/'));\n  const toParts = trim(to.split('/'));\n\n  const length = Math.min(fromParts.length, toParts.length);\n  let samePartsLength = length;\n  for (let i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  let outputParts = [];\n  for (let i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n  const isPathAbsolute = isAbsolute(path);\n  const trailingSlash = path.substr(-1) === '/';\n\n  // Normalize the path\n  let normalizedPath = normalizeArray(path.split('/').filter(p => !!p), !isPathAbsolute).join('/');\n\n  if (!normalizedPath && !isPathAbsolute) {\n    normalizedPath = '.';\n  }\n  if (normalizedPath && trailingSlash) {\n    normalizedPath += '/';\n  }\n\n  return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n  return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n  return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n  const result = splitPath(path);\n  const root = result[0];\n  let dir = result[1];\n\n  if (!root && !dir) {\n    // No dirname whatsoever\n    return '.';\n  }\n\n  if (dir) {\n    // It has a dirname, strip trailing slash\n    dir = dir.substr(0, dir.length - 1);\n  }\n\n  return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n  let f = splitPath(path)[2];\n  if (ext && f.substr(ext.length * -1) === ext) {\n    f = f.substr(0, f.length - ext.length);\n  }\n  return f;\n}\n","import { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n  /** Pending */\n  PENDING = 'PENDING',\n  /** Resolved / OK */\n  RESOLVED = 'RESOLVED',\n  /** Rejected / Error */\n  REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise<T> implements PromiseLike<T> {\n  private _state: States = States.PENDING;\n  private _handlers: Array<{\n    done: boolean;\n    onfulfilled?: ((value: T) => T | PromiseLike<T>) | null;\n    onrejected?: ((reason: any) => any) | null;\n  }> = [];\n  private _value: any;\n\n  public constructor(\n    executor: (resolve: (value?: T | PromiseLike<T> | null) => void, reject: (reason?: any) => void) => void,\n  ) {\n    try {\n      executor(this._resolve, this._reject);\n    } catch (e) {\n      this._reject(e);\n    }\n  }\n\n  /** JSDoc */\n  public toString(): string {\n    return '[object SyncPromise]';\n  }\n\n  /** JSDoc */\n  public static resolve<T>(value: T | PromiseLike<T>): PromiseLike<T> {\n    return new SyncPromise(resolve => {\n      resolve(value);\n    });\n  }\n\n  /** JSDoc */\n  public static reject<T = never>(reason?: any): PromiseLike<T> {\n    return new SyncPromise((_, reject) => {\n      reject(reason);\n    });\n  }\n\n  /** JSDoc */\n  public static all<U = any>(collection: Array<U | PromiseLike<U>>): PromiseLike<U[]> {\n    return new SyncPromise<U[]>((resolve, reject) => {\n      if (!Array.isArray(collection)) {\n        reject(new TypeError(`Promise.all requires an array as input.`));\n        return;\n      }\n\n      if (collection.length === 0) {\n        resolve([]);\n        return;\n      }\n\n      let counter = collection.length;\n      const resolvedCollection: U[] = [];\n\n      collection.forEach((item, index) => {\n        SyncPromise.resolve(item)\n          .then(value => {\n            resolvedCollection[index] = value;\n            counter -= 1;\n\n            if (counter !== 0) {\n              return;\n            }\n            resolve(resolvedCollection);\n          })\n          .then(null, reject);\n      });\n    });\n  }\n\n  /** JSDoc */\n  public then<TResult1 = T, TResult2 = never>(\n    onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n    onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,\n  ): PromiseLike<TResult1 | TResult2> {\n    return new SyncPromise((resolve, reject) => {\n      this._attachHandler({\n        done: false,\n        onfulfilled: result => {\n          if (!onfulfilled) {\n            // TODO: ¯\\_(ツ)_/¯\n            // TODO: FIXME\n            resolve(result as any);\n            return;\n          }\n          try {\n            resolve(onfulfilled(result));\n            return;\n          } catch (e) {\n            reject(e);\n            return;\n          }\n        },\n        onrejected: reason => {\n          if (!onrejected) {\n            reject(reason);\n            return;\n          }\n          try {\n            resolve(onrejected(reason));\n            return;\n          } catch (e) {\n            reject(e);\n            return;\n          }\n        },\n      });\n    });\n  }\n\n  /** JSDoc */\n  public catch<TResult = never>(\n    onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,\n  ): PromiseLike<T | TResult> {\n    return this.then(val => val, onrejected);\n  }\n\n  /** JSDoc */\n  public finally<TResult>(onfinally?: (() => void) | null): PromiseLike<TResult> {\n    return new SyncPromise<TResult>((resolve, reject) => {\n      let val: TResult | any;\n      let isRejected: boolean;\n\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\n        resolve((val as unknown) as any);\n      });\n    });\n  }\n\n  /** JSDoc */\n  private readonly _resolve = (value?: T | PromiseLike<T> | null) => {\n    this._setResult(States.RESOLVED, value);\n  };\n\n  /** JSDoc */\n  private readonly _reject = (reason?: any) => {\n    this._setResult(States.REJECTED, reason);\n  };\n\n  /** JSDoc */\n  private readonly _setResult = (state: States, value?: T | PromiseLike<T> | any) => {\n    if (this._state !== States.PENDING) {\n      return;\n    }\n\n    if (isThenable(value)) {\n      (value as PromiseLike<T>).then(this._resolve, this._reject);\n      return;\n    }\n\n    this._state = state;\n    this._value = value;\n\n    this._executeHandlers();\n  };\n\n  // TODO: FIXME\n  /** JSDoc */\n  private readonly _attachHandler = (handler: {\n    /** JSDoc */\n    done: boolean;\n    /** JSDoc */\n    onfulfilled?(value: T): any;\n    /** JSDoc */\n    onrejected?(reason: any): any;\n  }) => {\n    this._handlers = this._handlers.concat(handler);\n    this._executeHandlers();\n  };\n\n  /** JSDoc */\n  private readonly _executeHandlers = () => {\n    if (this._state === States.PENDING) {\n      return;\n    }\n\n    const cachedHandlers = this._handlers.slice();\n    this._handlers = [];\n\n    cachedHandlers.forEach(handler => {\n      if (handler.done) {\n        return;\n      }\n\n      if (this._state === States.RESOLVED) {\n        if (handler.onfulfilled) {\n          handler.onfulfilled((this._value as unknown) as any);\n        }\n      }\n\n      if (this._state === States.REJECTED) {\n        if (handler.onrejected) {\n          handler.onrejected(this._value);\n        }\n      }\n\n      handler.done = true;\n    });\n  };\n}\n\nexport { SyncPromise };\n","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer<T> {\n  public constructor(protected _limit?: number) {}\n\n  /** Internal set of queued Promises */\n  private readonly _buffer: Array<PromiseLike<T>> = [];\n\n  /**\n   * Says if the buffer is ready to take more requests\n   */\n  public isReady(): boolean {\n    return this._limit === undefined || this.length() < this._limit;\n  }\n\n  /**\n   * Add a promise to the queue.\n   *\n   * @param task Can be any PromiseLike<T>\n   * @returns The original promise.\n   */\n  public add(task: PromiseLike<T>): PromiseLike<T> {\n    if (!this.isReady()) {\n      return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n    }\n    if (this._buffer.indexOf(task) === -1) {\n      this._buffer.push(task);\n    }\n    task\n      .then(() => this.remove(task))\n      .then(null, () =>\n        this.remove(task).then(null, () => {\n          // We have to add this catch here otherwise we have an unhandledPromiseRejection\n          // because it's a new Promise chain.\n        }),\n      );\n    return task;\n  }\n\n  /**\n   * Remove a promise to the queue.\n   *\n   * @param task Can be any PromiseLike<T>\n   * @returns Removed promise.\n   */\n  public remove(task: PromiseLike<T>): PromiseLike<T> {\n    const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n    return removedTask;\n  }\n\n  /**\n   * This function returns the number of unresolved promises in the queue.\n   */\n  public length(): number {\n    return this._buffer.length;\n  }\n\n  /**\n   * This will drain the whole queue, returns true if queue is empty or drained.\n   * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n   *\n   * @param timeout Number in ms to wait until it resolves with false.\n   */\n  public drain(timeout?: number): PromiseLike<boolean> {\n    return new SyncPromise<boolean>(resolve => {\n      const capturedSetTimeout = setTimeout(() => {\n        if (timeout && timeout > 0) {\n          resolve(false);\n        }\n      }, timeout);\n      SyncPromise.all(this._buffer)\n        .then(() => {\n          clearTimeout(capturedSetTimeout);\n          resolve(true);\n        })\n        .then(null, () => {\n          resolve(true);\n        });\n    });\n  }\n}\n","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n  try {\n    // tslint:disable:no-unused-expression\n    new ErrorEvent('');\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n  try {\n    // It really needs 1 argument, not 0.\n    // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n    // 1 argument required, but only 0 present.\n    // @ts-ignore\n    // tslint:disable:no-unused-expression\n    new DOMError('');\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n  try {\n    // tslint:disable:no-unused-expression\n    new DOMException('');\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n  if (!('fetch' in getGlobalObject<Window>())) {\n    return false;\n  }\n\n  try {\n    // tslint:disable-next-line:no-unused-expression\n    new Headers();\n    // tslint:disable-next-line:no-unused-expression\n    new Request('');\n    // tslint:disable-next-line:no-unused-expression\n    new Response();\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func: Function): boolean {\n  return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n  if (!supportsFetch()) {\n    return false;\n  }\n\n  const global = getGlobalObject<Window>();\n\n  // Fast path to avoid DOM I/O\n  // tslint:disable-next-line:no-unbound-method\n  if (isNativeFetch(global.fetch)) {\n    return true;\n  }\n\n  // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n  // so create a \"pure\" iframe to see if that has native fetch\n  let result = false;\n  const doc = global.document;\n  // tslint:disable-next-line:no-unbound-method deprecation\n  if (doc && typeof (doc.createElement as unknown) === `function`) {\n    try {\n      const sandbox = doc.createElement('iframe');\n      sandbox.hidden = true;\n      doc.head.appendChild(sandbox);\n      if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n        // tslint:disable-next-line:no-unbound-method\n        result = isNativeFetch(sandbox.contentWindow.fetch);\n      }\n      doc.head.removeChild(sandbox);\n    } catch (err) {\n      logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n    }\n  }\n\n  return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n  // tslint:disable-next-line: no-unsafe-any\n  return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n  // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n  // https://caniuse.com/#feat=referrer-policy\n  // It doesn't. And it throw exception instead of ignoring this parameter...\n  // REF: https://github.com/getsentry/raven-js/issues/1233\n\n  if (!supportsFetch()) {\n    return false;\n  }\n\n  try {\n    // tslint:disable:no-unused-expression\n    new Request('_', {\n      referrerPolicy: 'origin' as ReferrerPolicy,\n    });\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n  // NOTE: in Chrome App environment, touching history.pushState, *even inside\n  //       a try/catch block*, will cause Chrome to output an error to console.error\n  // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n  const global = getGlobalObject<Window>();\n  const chrome = (global as any).chrome;\n  // tslint:disable-next-line:no-unsafe-any\n  const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n  const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n  return !isChromePackagedApp && hasHistoryApi;\n}\n","/* tslint:disable:only-arrow-functions no-unsafe-any */\n\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject<Window>();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n  type: InstrumentHandlerType;\n  callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n  | 'console'\n  | 'dom'\n  | 'fetch'\n  | 'history'\n  | 'sentry'\n  | 'xhr'\n  | 'error'\n  | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n *  - Console API\n *  - Fetch API\n *  - XHR API\n *  - History API\n *  - DOM API (click/typing)\n *  - Error API\n *  - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n  if (instrumented[type]) {\n    return;\n  }\n\n  instrumented[type] = true;\n\n  switch (type) {\n    case 'console':\n      instrumentConsole();\n      break;\n    case 'dom':\n      instrumentDOM();\n      break;\n    case 'xhr':\n      instrumentXHR();\n      break;\n    case 'fetch':\n      instrumentFetch();\n      break;\n    case 'history':\n      instrumentHistory();\n      break;\n    case 'error':\n      instrumentError();\n      break;\n    case 'unhandledrejection':\n      instrumentUnhandledRejection();\n      break;\n    default:\n      logger.warn('unknown instrumentation type:', type);\n  }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n  // tslint:disable-next-line:strict-type-predicates\n  if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n    return;\n  }\n  handlers[handler.type] = handlers[handler.type] || [];\n  (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n  instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n  if (!type || !handlers[type]) {\n    return;\n  }\n\n  for (const handler of handlers[type] || []) {\n    try {\n      handler(data);\n    } catch (e) {\n      logger.error(\n        `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n          handler,\n        )}\\nError: ${e}`,\n      );\n    }\n  }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n  if (!('console' in global)) {\n    return;\n  }\n\n  ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n    if (!(level in global.console)) {\n      return;\n    }\n\n    fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n      return function(...args: any[]): void {\n        triggerHandlers('console', { args, level });\n\n        // this fails for some browsers. :(\n        if (originalConsoleLevel) {\n          Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n        }\n      };\n    });\n  });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n  if (!supportsNativeFetch()) {\n    return;\n  }\n\n  fill(global, 'fetch', function(originalFetch: () => void): () => void {\n    return function(...args: any[]): void {\n      const commonHandlerData = {\n        args,\n        fetchData: {\n          method: getFetchMethod(args),\n          url: getFetchUrl(args),\n        },\n        startTimestamp: Date.now(),\n      };\n\n      triggerHandlers('fetch', {\n        ...commonHandlerData,\n      });\n\n      return originalFetch.apply(global, args).then(\n        (response: Response) => {\n          triggerHandlers('fetch', {\n            ...commonHandlerData,\n            endTimestamp: Date.now(),\n            response,\n          });\n          return response;\n        },\n        (error: Error) => {\n          triggerHandlers('fetch', {\n            ...commonHandlerData,\n            endTimestamp: Date.now(),\n            error,\n          });\n          throw error;\n        },\n      );\n    };\n  });\n}\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n  [key: string]: any;\n  __sentry_xhr__?: {\n    method?: string;\n    url?: string;\n    status_code?: number;\n  };\n}\n\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n  if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n    return String(fetchArgs[0].method).toUpperCase();\n  }\n  if (fetchArgs[1] && fetchArgs[1].method) {\n    return String(fetchArgs[1].method).toUpperCase();\n  }\n  return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n  if (typeof fetchArgs[0] === 'string') {\n    return fetchArgs[0];\n  }\n  if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n    return fetchArgs[0].url;\n  }\n  return String(fetchArgs[0]);\n}\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n  if (!('XMLHttpRequest' in global)) {\n    return;\n  }\n\n  const xhrproto = XMLHttpRequest.prototype;\n\n  fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n    return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n      const xhr = this; // tslint:disable-line:no-this-assignment\n      const url = args[1];\n      xhr.__sentry_xhr__ = {\n        method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n        url: args[1],\n      };\n\n      // if Sentry key appears in URL, don't capture it as a request\n      if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n        xhr.__sentry_own_request__ = true;\n      }\n\n      const onreadystatechangeHandler = function(): void {\n        if (xhr.readyState === 4) {\n          try {\n            // touching statusCode in some platforms throws\n            // an exception\n            if (xhr.__sentry_xhr__) {\n              xhr.__sentry_xhr__.status_code = xhr.status;\n            }\n          } catch (e) {\n            /* do nothing */\n          }\n          triggerHandlers('xhr', {\n            args,\n            endTimestamp: Date.now(),\n            startTimestamp: Date.now(),\n            xhr,\n          });\n        }\n      };\n\n      if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n        fill(xhr, 'onreadystatechange', function(original: WrappedFunction): Function {\n          return function(...readyStateArgs: any[]): void {\n            onreadystatechangeHandler();\n            return original.apply(xhr, readyStateArgs);\n          };\n        });\n      } else {\n        xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n      }\n\n      return originalOpen.apply(xhr, args);\n    };\n  });\n\n  fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n    return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n      triggerHandlers('xhr', {\n        args,\n        startTimestamp: Date.now(),\n        xhr: this,\n      });\n\n      return originalSend.apply(this, args);\n    };\n  });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n  if (!supportsHistory()) {\n    return;\n  }\n\n  const oldOnPopState = global.onpopstate;\n  global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n    const to = global.location.href;\n    // keep track of the current URL state, as we always receive only the updated state\n    const from = lastHref;\n    lastHref = to;\n    triggerHandlers('history', {\n      from,\n      to,\n    });\n    if (oldOnPopState) {\n      return oldOnPopState.apply(this, args);\n    }\n  };\n\n  /** @hidden */\n  function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n    return function(this: History, ...args: any[]): void {\n      const url = args.length > 2 ? args[2] : undefined;\n      if (url) {\n        // coerce to string (this is what pushState does)\n        const from = lastHref;\n        const to = String(url);\n        // keep track of the current URL state, as we always receive only the updated state\n        lastHref = to;\n        triggerHandlers('history', {\n          from,\n          to,\n        });\n      }\n      return originalHistoryFunction.apply(this, args);\n    };\n  }\n\n  fill(global.history, 'pushState', historyReplacementFunction);\n  fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n  if (!('document' in global)) {\n    return;\n  }\n\n  // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n  // to the document. Do this before we instrument addEventListener.\n  global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n  global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n\n  // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n  ['EventTarget', 'Node'].forEach((target: string) => {\n    const proto = (global as any)[target] && (global as any)[target].prototype;\n\n    if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n      return;\n    }\n\n    fill(proto, 'addEventListener', function(\n      original: () => void,\n    ): (\n      eventName: string,\n      fn: EventListenerOrEventListenerObject,\n      options?: boolean | AddEventListenerOptions,\n    ) => void {\n      return function(\n        this: any,\n        eventName: string,\n        fn: EventListenerOrEventListenerObject,\n        options?: boolean | AddEventListenerOptions,\n      ): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {\n        if (fn && (fn as EventListenerObject).handleEvent) {\n          if (eventName === 'click') {\n            fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n              return function(this: any, event: Event): (event: Event) => void {\n                domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n                return innerOriginal.call(this, event);\n              };\n            });\n          }\n          if (eventName === 'keypress') {\n            fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n              return function(this: any, event: Event): (event: Event) => void {\n                keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n                return innerOriginal.call(this, event);\n              };\n            });\n          }\n        } else {\n          if (eventName === 'click') {\n            domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n          }\n          if (eventName === 'keypress') {\n            keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n          }\n        }\n\n        return original.call(this, eventName, fn, options);\n      };\n    });\n\n    fill(proto, 'removeEventListener', function(\n      original: () => void,\n    ): (\n      this: any,\n      eventName: string,\n      fn: EventListenerOrEventListenerObject,\n      options?: boolean | EventListenerOptions,\n    ) => () => void {\n      return function(\n        this: any,\n        eventName: string,\n        fn: EventListenerOrEventListenerObject,\n        options?: boolean | EventListenerOptions,\n      ): () => void {\n        let callback = fn as WrappedFunction;\n        try {\n          callback = callback && (callback.__sentry_wrapped__ || callback);\n        } catch (e) {\n          // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n        }\n        return original.call(this, eventName, callback, options);\n      };\n    });\n  });\n}\n\nconst debounceDuration: number = 1000;\nlet debounceTimer: number = 0;\nlet keypressTimeout: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name: string, handler: Function, debounce: boolean = false): (event: Event) => void {\n  return (event: Event) => {\n    // reset keypress timeout; e.g. triggering a 'click' after\n    // a 'keypress' will reset the keypress debounce so that a new\n    // set of keypresses can be recorded\n    keypressTimeout = undefined;\n    // It's possible this handler might trigger multiple times for the same\n    // event (e.g. event propagation through node ancestors). Ignore if we've\n    // already captured the event.\n    if (!event || lastCapturedEvent === event) {\n      return;\n    }\n\n    lastCapturedEvent = event;\n\n    if (debounceTimer) {\n      clearTimeout(debounceTimer);\n    }\n\n    if (debounce) {\n      debounceTimer = setTimeout(() => {\n        handler({ event, name });\n      });\n    } else {\n      handler({ event, name });\n    }\n  };\n}\n\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler: Function): (event: Event) => void {\n  // TODO: if somehow user switches keypress target before\n  //       debounce timeout is triggered, we will only capture\n  //       a single breadcrumb from the FIRST target (acceptable?)\n  return (event: Event) => {\n    let target;\n\n    try {\n      target = event.target;\n    } catch (e) {\n      // just accessing event properties can throw an exception in some rare circumstances\n      // see: https://github.com/getsentry/raven-js/issues/838\n      return;\n    }\n\n    const tagName = target && (target as HTMLElement).tagName;\n\n    // only consider keypress events on actual input elements\n    // this will disregard keypresses targeting body (e.g. tabbing\n    // through elements, hotkeys, etc)\n    if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !(target as HTMLElement).isContentEditable)) {\n      return;\n    }\n\n    // record first keypress in a series, but ignore subsequent\n    // keypresses until debounce clears\n    if (!keypressTimeout) {\n      domEventHandler('input', handler)(event);\n    }\n    clearTimeout(keypressTimeout);\n\n    keypressTimeout = (setTimeout(() => {\n      keypressTimeout = undefined;\n    }, debounceDuration) as any) as number;\n  };\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n  _oldOnErrorHandler = global.onerror;\n\n  global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n    triggerHandlers('error', {\n      column,\n      error,\n      line,\n      msg,\n      url,\n    });\n\n    if (_oldOnErrorHandler) {\n      return _oldOnErrorHandler.apply(this, arguments);\n    }\n\n    return false;\n  };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n  _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n  global.onunhandledrejection = function(e: any): boolean {\n    triggerHandlers('unhandledrejection', e);\n\n    if (_oldOnUnhandledRejectionHandler) {\n      return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n    }\n\n    return true;\n  };\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n  /** Protocol used to connect to Sentry. */\n  public protocol!: DsnProtocol;\n  /** Public authorization key. */\n  public user!: string;\n  /** Private authorization key (deprecated, optional). */\n  public pass!: string;\n  /** Hostname of the Sentry instance. */\n  public host!: string;\n  /** Port of the Sentry instance. */\n  public port!: string;\n  /** Path */\n  public path!: string;\n  /** Project ID */\n  public projectId!: string;\n\n  /** Creates a new Dsn component */\n  public constructor(from: DsnLike) {\n    if (typeof from === 'string') {\n      this._fromString(from);\n    } else {\n      this._fromComponents(from);\n    }\n\n    this._validate();\n  }\n\n  /**\n   * Renders the string representation of this Dsn.\n   *\n   * By default, this will render the public representation without the password\n   * component. To get the deprecated private representation, set `withPassword`\n   * to true.\n   *\n   * @param withPassword When set to true, the password will be included.\n   */\n  public toString(withPassword: boolean = false): string {\n    // tslint:disable-next-line:no-this-assignment\n    const { host, path, pass, port, projectId, protocol, user } = this;\n    return (\n      `${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` +\n      `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n    );\n  }\n\n  /** Parses a string into this Dsn. */\n  private _fromString(str: string): void {\n    const match = DSN_REGEX.exec(str);\n\n    if (!match) {\n      throw new SentryError(ERROR_MESSAGE);\n    }\n\n    const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);\n    let path = '';\n    let projectId = lastPath;\n\n    const split = projectId.split('/');\n    if (split.length > 1) {\n      path = split.slice(0, -1).join('/');\n      projectId = split.pop() as string;\n    }\n\n    if (projectId) {\n      const projectMatch = projectId.match(/^\\d+/);\n      if (projectMatch) {\n        projectId = projectMatch[0];\n      }\n    }\n\n    this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });\n  }\n\n  /** Maps Dsn components into this instance. */\n  private _fromComponents(components: DsnComponents): void {\n    this.protocol = components.protocol;\n    this.user = components.user;\n    this.pass = components.pass || '';\n    this.host = components.host;\n    this.port = components.port || '';\n    this.path = components.path || '';\n    this.projectId = components.projectId;\n  }\n\n  /** Validates this Dsn and throws on error. */\n  private _validate(): void {\n    ['protocol', 'user', 'host', 'projectId'].forEach(component => {\n      if (!this[component as keyof DsnComponents]) {\n        throw new SentryError(`${ERROR_MESSAGE}: ${component} missing`);\n      }\n    });\n\n    if (!this.projectId.match(/^\\d+$/)) {\n      throw new SentryError(`${ERROR_MESSAGE}: Invalid projectId ${this.projectId}`);\n    }\n\n    if (this.protocol !== 'http' && this.protocol !== 'https') {\n      throw new SentryError(`${ERROR_MESSAGE}: Invalid protocol ${this.protocol}`);\n    }\n\n    if (this.port && isNaN(parseInt(this.port, 10))) {\n      throw new SentryError(`${ERROR_MESSAGE}: Invalid port ${this.port}`);\n    }\n  }\n}\n","import {\n  Breadcrumb,\n  CaptureContext,\n  Event,\n  EventHint,\n  EventProcessor,\n  Scope as ScopeInterface,\n  ScopeContext,\n  Severity,\n  Span,\n  User,\n} from '@sentry/types';\nimport { getGlobalObject, isPlainObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n  /** Flag if notifiying is happening. */\n  protected _notifyingListeners: boolean = false;\n\n  /** Callback for client to receive scope changes. */\n  protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n  /** Callback list that will be called after {@link applyToEvent}. */\n  protected _eventProcessors: EventProcessor[] = [];\n\n  /** Array of breadcrumbs. */\n  protected _breadcrumbs: Breadcrumb[] = [];\n\n  /** User */\n  protected _user: User = {};\n\n  /** Tags */\n  protected _tags: { [key: string]: string } = {};\n\n  /** Extra */\n  protected _extra: { [key: string]: any } = {};\n\n  /** Contexts */\n  protected _contexts: { [key: string]: any } = {};\n\n  /** Fingerprint */\n  protected _fingerprint?: string[];\n\n  /** Severity */\n  protected _level?: Severity;\n\n  /** Transaction */\n  protected _transaction?: string;\n\n  /** Span */\n  protected _span?: Span;\n\n  /**\n   * Add internal on change listener. Used for sub SDKs that need to store the scope.\n   * @hidden\n   */\n  public addScopeListener(callback: (scope: Scope) => void): void {\n    this._scopeListeners.push(callback);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public addEventProcessor(callback: EventProcessor): this {\n    this._eventProcessors.push(callback);\n    return this;\n  }\n\n  /**\n   * This will be called on every set call.\n   */\n  protected _notifyScopeListeners(): void {\n    if (!this._notifyingListeners) {\n      this._notifyingListeners = true;\n      setTimeout(() => {\n        this._scopeListeners.forEach(callback => {\n          callback(this);\n        });\n        this._notifyingListeners = false;\n      });\n    }\n  }\n\n  /**\n   * This will be called after {@link applyToEvent} is finished.\n   */\n  protected _notifyEventProcessors(\n    processors: EventProcessor[],\n    event: Event | null,\n    hint?: EventHint,\n    index: number = 0,\n  ): PromiseLike<Event | null> {\n    return new SyncPromise<Event | null>((resolve, reject) => {\n      const processor = processors[index];\n      // tslint:disable-next-line:strict-type-predicates\n      if (event === null || typeof processor !== 'function') {\n        resolve(event);\n      } else {\n        const result = processor({ ...event }, hint) as Event | null;\n        if (isThenable(result)) {\n          (result as PromiseLike<Event | null>)\n            .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n            .then(null, reject);\n        } else {\n          this._notifyEventProcessors(processors, result, hint, index + 1)\n            .then(resolve)\n            .then(null, reject);\n        }\n      }\n    });\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setUser(user: User | null): this {\n    this._user = user || {};\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setTags(tags: { [key: string]: string }): this {\n    this._tags = {\n      ...this._tags,\n      ...tags,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setTag(key: string, value: string): this {\n    this._tags = { ...this._tags, [key]: value };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setExtras(extras: { [key: string]: any }): this {\n    this._extra = {\n      ...this._extra,\n      ...extras,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setExtra(key: string, extra: any): this {\n    this._extra = { ...this._extra, [key]: extra };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setFingerprint(fingerprint: string[]): this {\n    this._fingerprint = fingerprint;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setLevel(level: Severity): this {\n    this._level = level;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setTransaction(transaction?: string): this {\n    this._transaction = transaction;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setContext(key: string, context: { [key: string]: any } | null): this {\n    this._contexts = { ...this._contexts, [key]: context };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setSpan(span?: Span): this {\n    this._span = span;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Internal getter for Span, used in Hub.\n   * @hidden\n   */\n  public getSpan(): Span | undefined {\n    return this._span;\n  }\n\n  /**\n   * Inherit values from the parent scope.\n   * @param scope to clone.\n   */\n  public static clone(scope?: Scope): Scope {\n    const newScope = new Scope();\n    if (scope) {\n      newScope._breadcrumbs = [...scope._breadcrumbs];\n      newScope._tags = { ...scope._tags };\n      newScope._extra = { ...scope._extra };\n      newScope._contexts = { ...scope._contexts };\n      newScope._user = scope._user;\n      newScope._level = scope._level;\n      newScope._span = scope._span;\n      newScope._transaction = scope._transaction;\n      newScope._fingerprint = scope._fingerprint;\n      newScope._eventProcessors = [...scope._eventProcessors];\n    }\n    return newScope;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public update(captureContext?: CaptureContext): this {\n    if (!captureContext) {\n      return this;\n    }\n\n    if (typeof captureContext === 'function') {\n      const updatedScope = (captureContext as (<T>(scope: T) => T))(this);\n      return updatedScope instanceof Scope ? updatedScope : this;\n    }\n\n    if (captureContext instanceof Scope) {\n      this._tags = { ...this._tags, ...captureContext._tags };\n      this._extra = { ...this._extra, ...captureContext._extra };\n      this._contexts = { ...this._contexts, ...captureContext._contexts };\n      if (captureContext._user) {\n        this._user = captureContext._user;\n      }\n      if (captureContext._level) {\n        this._level = captureContext._level;\n      }\n      if (captureContext._fingerprint) {\n        this._fingerprint = captureContext._fingerprint;\n      }\n    } else if (isPlainObject(captureContext)) {\n      // tslint:disable-next-line:no-parameter-reassignment\n      captureContext = captureContext as ScopeContext;\n      this._tags = { ...this._tags, ...captureContext.tags };\n      this._extra = { ...this._extra, ...captureContext.extra };\n      this._contexts = { ...this._contexts, ...captureContext.contexts };\n      if (captureContext.user) {\n        this._user = captureContext.user;\n      }\n      if (captureContext.level) {\n        this._level = captureContext.level;\n      }\n      if (captureContext.fingerprint) {\n        this._fingerprint = captureContext.fingerprint;\n      }\n    }\n\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public clear(): this {\n    this._breadcrumbs = [];\n    this._tags = {};\n    this._extra = {};\n    this._user = {};\n    this._contexts = {};\n    this._level = undefined;\n    this._transaction = undefined;\n    this._fingerprint = undefined;\n    this._span = undefined;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n    const mergedBreadcrumb = {\n      timestamp: timestampWithMs(),\n      ...breadcrumb,\n    };\n\n    this._breadcrumbs =\n      maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n        ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs)\n        : [...this._breadcrumbs, mergedBreadcrumb];\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public clearBreadcrumbs(): this {\n    this._breadcrumbs = [];\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Applies fingerprint from the scope to the event if there's one,\n   * uses message if there's one instead or get rid of empty fingerprint\n   */\n  private _applyFingerprint(event: Event): void {\n    // Make sure it's an array first and we actually have something in place\n    event.fingerprint = event.fingerprint\n      ? Array.isArray(event.fingerprint)\n        ? event.fingerprint\n        : [event.fingerprint]\n      : [];\n\n    // If we have something on the scope, then merge it with event\n    if (this._fingerprint) {\n      event.fingerprint = event.fingerprint.concat(this._fingerprint);\n    }\n\n    // If we have no data at all, remove empty array default\n    if (event.fingerprint && !event.fingerprint.length) {\n      delete event.fingerprint;\n    }\n  }\n\n  /**\n   * Applies the current context and fingerprint to the event.\n   * Note that breadcrumbs will be added by the client.\n   * Also if the event has already breadcrumbs on it, we do not merge them.\n   * @param event Event\n   * @param hint May contain additional informartion about the original exception.\n   * @hidden\n   */\n  public applyToEvent(event: Event, hint?: EventHint): PromiseLike<Event | null> {\n    if (this._extra && Object.keys(this._extra).length) {\n      event.extra = { ...this._extra, ...event.extra };\n    }\n    if (this._tags && Object.keys(this._tags).length) {\n      event.tags = { ...this._tags, ...event.tags };\n    }\n    if (this._user && Object.keys(this._user).length) {\n      event.user = { ...this._user, ...event.user };\n    }\n    if (this._contexts && Object.keys(this._contexts).length) {\n      event.contexts = { ...this._contexts, ...event.contexts };\n    }\n    if (this._level) {\n      event.level = this._level;\n    }\n    if (this._transaction) {\n      event.transaction = this._transaction;\n    }\n    // We want to set the trace context for normal events only if there isn't already\n    // a trace context on the event. There is a product feature in place where we link\n    // errors with transaction and it relys on that.\n    if (this._span) {\n      event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n    }\n\n    this._applyFingerprint(event);\n\n    event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n    event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n    return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n  }\n}\n\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n  const global = getGlobalObject<Window | NodeJS.Global>();\n  global.__SENTRY__ = global.__SENTRY__ || {};\n  global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n  return global.__SENTRY__.globalEventProcessors;\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n  getGlobalEventProcessors().push(callback);\n}\n","import {\n  Breadcrumb,\n  BreadcrumbHint,\n  Client,\n  Event,\n  EventHint,\n  Hub as HubInterface,\n  Integration,\n  IntegrationClass,\n  Severity,\n  Span,\n  SpanContext,\n  Transaction,\n  TransactionContext,\n  User,\n} from '@sentry/types';\nimport { consoleSandbox, getGlobalObject, isNodeEnv, logger, timestampWithMs, uuid4 } from '@sentry/utils';\n\nimport { Carrier, Layer } from './interfaces';\nimport { Scope } from './scope';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 3;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n  /** Is a {@link Layer}[] containing the client and scope */\n  private readonly _stack: Layer[] = [];\n\n  /** Contains the last event id of a captured event.  */\n  private _lastEventId?: string;\n\n  /**\n   * Creates a new instance of the hub, will push one {@link Layer} into the\n   * internal stack on creation.\n   *\n   * @param client bound to the hub.\n   * @param scope bound to the hub.\n   * @param version number, higher number means higher priority.\n   */\n  public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n    this._stack.push({ client, scope });\n  }\n\n  /**\n   * Internal helper function to call a method on the top client if it exists.\n   *\n   * @param method The method to call on the client.\n   * @param args Arguments to pass to the client function.\n   */\n  private _invokeClient<M extends keyof Client>(method: M, ...args: any[]): void {\n    const top = this.getStackTop();\n    if (top && top.client && top.client[method]) {\n      (top.client as any)[method](...args, top.scope);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public isOlderThan(version: number): boolean {\n    return this._version < version;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public bindClient(client?: Client): void {\n    const top = this.getStackTop();\n    top.client = client;\n    if (client && client.setupIntegrations) {\n      client.setupIntegrations();\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public pushScope(): Scope {\n    // We want to clone the content of prev scope\n    const stack = this.getStack();\n    const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n    const scope = Scope.clone(parentScope);\n    this.getStack().push({\n      client: this.getClient(),\n      scope,\n    });\n    return scope;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public popScope(): boolean {\n    return this.getStack().pop() !== undefined;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public withScope(callback: (scope: Scope) => void): void {\n    const scope = this.pushScope();\n    try {\n      callback(scope);\n    } finally {\n      this.popScope();\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public getClient<C extends Client>(): C | undefined {\n    return this.getStackTop().client as C;\n  }\n\n  /** Returns the scope of the top stack. */\n  public getScope(): Scope | undefined {\n    return this.getStackTop().scope;\n  }\n\n  /** Returns the scope stack for domains or the process. */\n  public getStack(): Layer[] {\n    return this._stack;\n  }\n\n  /** Returns the topmost scope layer in the order domain > local > process. */\n  public getStackTop(): Layer {\n    return this._stack[this._stack.length - 1];\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureException(exception: any, hint?: EventHint): string {\n    const eventId = (this._lastEventId = uuid4());\n    let finalHint = hint;\n\n    // If there's no explicit hint provided, mimick the same thing that would happen\n    // in the minimal itself to create a consistent behavior.\n    // We don't do this in the client, as it's the lowest level API, and doing this,\n    // would prevent user from having full control over direct calls.\n    if (!hint) {\n      let syntheticException: Error;\n      try {\n        throw new Error('Sentry syntheticException');\n      } catch (exception) {\n        syntheticException = exception as Error;\n      }\n      finalHint = {\n        originalException: exception,\n        syntheticException,\n      };\n    }\n\n    this._invokeClient('captureException', exception, {\n      ...finalHint,\n      event_id: eventId,\n    });\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n    const eventId = (this._lastEventId = uuid4());\n    let finalHint = hint;\n\n    // If there's no explicit hint provided, mimick the same thing that would happen\n    // in the minimal itself to create a consistent behavior.\n    // We don't do this in the client, as it's the lowest level API, and doing this,\n    // would prevent user from having full control over direct calls.\n    if (!hint) {\n      let syntheticException: Error;\n      try {\n        throw new Error(message);\n      } catch (exception) {\n        syntheticException = exception as Error;\n      }\n      finalHint = {\n        originalException: message,\n        syntheticException,\n      };\n    }\n\n    this._invokeClient('captureMessage', message, level, {\n      ...finalHint,\n      event_id: eventId,\n    });\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureEvent(event: Event, hint?: EventHint): string {\n    const eventId = (this._lastEventId = uuid4());\n    this._invokeClient('captureEvent', event, {\n      ...hint,\n      event_id: eventId,\n    });\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public lastEventId(): string | undefined {\n    return this._lastEventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n    const top = this.getStackTop();\n\n    if (!top.scope || !top.client) {\n      return;\n    }\n\n    const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n      (top.client.getOptions && top.client.getOptions()) || {};\n\n    if (maxBreadcrumbs <= 0) {\n      return;\n    }\n\n    const timestamp = timestampWithMs();\n    const mergedBreadcrumb = { timestamp, ...breadcrumb };\n    const finalBreadcrumb = beforeBreadcrumb\n      ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n      : mergedBreadcrumb;\n\n    if (finalBreadcrumb === null) {\n      return;\n    }\n\n    top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setUser(user: User | null): void {\n    const top = this.getStackTop();\n    if (!top.scope) {\n      return;\n    }\n    top.scope.setUser(user);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setTags(tags: { [key: string]: string }): void {\n    const top = this.getStackTop();\n    if (!top.scope) {\n      return;\n    }\n    top.scope.setTags(tags);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setExtras(extras: { [key: string]: any }): void {\n    const top = this.getStackTop();\n    if (!top.scope) {\n      return;\n    }\n    top.scope.setExtras(extras);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setTag(key: string, value: string): void {\n    const top = this.getStackTop();\n    if (!top.scope) {\n      return;\n    }\n    top.scope.setTag(key, value);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setExtra(key: string, extra: any): void {\n    const top = this.getStackTop();\n    if (!top.scope) {\n      return;\n    }\n    top.scope.setExtra(key, extra);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setContext(name: string, context: { [key: string]: any } | null): void {\n    const top = this.getStackTop();\n    if (!top.scope) {\n      return;\n    }\n    top.scope.setContext(name, context);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public configureScope(callback: (scope: Scope) => void): void {\n    const top = this.getStackTop();\n    if (top.scope && top.client) {\n      callback(top.scope);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public run(callback: (hub: Hub) => void): void {\n    const oldHub = makeMain(this);\n    try {\n      callback(this);\n    } finally {\n      makeMain(oldHub);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null {\n    const client = this.getClient();\n    if (!client) {\n      return null;\n    }\n    try {\n      return client.getIntegration(integration);\n    } catch (_oO) {\n      logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n      return null;\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public startSpan(context: SpanContext): Span {\n    return this._callExtensionMethod('startSpan', context);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public startTransaction(context: TransactionContext): Transaction {\n    return this._callExtensionMethod('startTransaction', context);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public traceHeaders(): { [key: string]: string } {\n    return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n  }\n\n  /**\n   * Calls global extension method and binding current instance to the function call\n   */\n  // @ts-ignore\n  private _callExtensionMethod<T>(method: string, ...args: any[]): T {\n    const carrier = getMainCarrier();\n    const sentry = carrier.__SENTRY__;\n    // tslint:disable-next-line: strict-type-predicates\n    if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n      return sentry.extensions[method].apply(this, args);\n    }\n    logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n  }\n}\n\n/** Returns the global shim registry. */\nexport function getMainCarrier(): Carrier {\n  const carrier = getGlobalObject();\n  carrier.__SENTRY__ = carrier.__SENTRY__ || {\n    extensions: {},\n    hub: undefined,\n  };\n  return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n  const registry = getMainCarrier();\n  const oldHub = getHubFromCarrier(registry);\n  setHubOnCarrier(registry, hub);\n  return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n  // Get main carrier (global for every environment)\n  const registry = getMainCarrier();\n\n  // If there's no hub, or its an old API, assign a new one\n  if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n    setHubOnCarrier(registry, new Hub());\n  }\n\n  // Prefer domains over global if they are there (applicable only to Node environment)\n  if (isNodeEnv()) {\n    return getHubFromActiveDomain(registry);\n  }\n  // Return hub that lives on a global object\n  return getHubFromCarrier(registry);\n}\n\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n  try {\n    const property = 'domain';\n    const carrier = getMainCarrier();\n    const sentry = carrier.__SENTRY__;\n    // tslint:disable-next-line: strict-type-predicates\n    if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n      return getHubFromCarrier(registry);\n    }\n    const domain = sentry.extensions[property] as any;\n    const activeDomain = domain.active;\n\n    // If there no active domain, just return global hub\n    if (!activeDomain) {\n      return getHubFromCarrier(registry);\n    }\n\n    // If there's no hub on current domain, or its an old API, assign a new one\n    if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n      const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n      setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n    }\n\n    // Return hub that lives on a domain\n    return getHubFromCarrier(activeDomain);\n  } catch (_Oo) {\n    // Return hub that lives on a global object\n    return getHubFromCarrier(registry);\n  }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n  if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n    return true;\n  }\n  return false;\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n  if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n    return carrier.__SENTRY__.hub;\n  }\n  carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n  carrier.__SENTRY__.hub = new Hub();\n  return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n  if (!carrier) {\n    return false;\n  }\n  carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n  carrier.__SENTRY__.hub = hub;\n  return true;\n}\n","import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport { Breadcrumb, CaptureContext, Event, Severity, Transaction, TransactionContext, User } from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub<T>(method: string, ...args: any[]): T {\n  const hub = getCurrentHub();\n  if (hub && hub[method as keyof Hub]) {\n    // tslint:disable-next-line:no-unsafe-any\n    return (hub[method as keyof Hub] as any)(...args);\n  }\n  throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception: any, captureContext?: CaptureContext): string {\n  let syntheticException: Error;\n  try {\n    throw new Error('Sentry syntheticException');\n  } catch (exception) {\n    syntheticException = exception as Error;\n  }\n  return callOnHub('captureException', exception, {\n    captureContext,\n    originalException: exception,\n    syntheticException,\n  });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, captureContext?: CaptureContext | Severity): string {\n  let syntheticException: Error;\n  try {\n    throw new Error(message);\n  } catch (exception) {\n    syntheticException = exception as Error;\n  }\n\n  // This is necessary to provide explicit scopes upgrade, without changing the original\n  // arrity of the `captureMessage(message, level)` method.\n  const level = typeof captureContext === 'string' ? captureContext : undefined;\n  const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n\n  return callOnHub('captureMessage', message, level, {\n    originalException: message,\n    syntheticException,\n    ...context,\n  });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n  return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n  callOnHub<void>('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n  callOnHub<void>('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n  callOnHub<void>('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: { [key: string]: any }): void {\n  callOnHub<void>('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: string }): void {\n  callOnHub<void>('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n\nexport function setExtra(key: string, extra: any): void {\n  callOnHub<void>('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key: string, value: string): void {\n  callOnHub<void>('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n  callOnHub<void>('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n *     pushScope();\n *     callback();\n *     popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n  callOnHub<void>('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method: string, ...args: any[]): void {\n  callOnHub<void>('_invokeClient', method, ...args);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual\n * tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and\n * child spans to other spans. To start a new child span within the transaction\n * or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished,\n * otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at\n * which point the transaction with all its finished child spans will be sent to\n * Sentry.\n *\n * @param context Properties of the new `Transaction`.\n */\nexport function startTransaction(context: TransactionContext): Transaction {\n  return callOnHub('startTransaction', { ...context });\n}\n","import { DsnLike } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Helper class to provide urls to different Sentry endpoints. */\nexport class API {\n  /** The internally used Dsn object. */\n  private readonly _dsnObject: Dsn;\n  /** Create a new instance of API */\n  public constructor(public dsn: DsnLike) {\n    this._dsnObject = new Dsn(dsn);\n  }\n\n  /** Returns the Dsn object. */\n  public getDsn(): Dsn {\n    return this._dsnObject;\n  }\n\n  /** Returns the prefix to construct Sentry ingestion API endpoints. */\n  public getBaseApiEndpoint(): string {\n    const dsn = this._dsnObject;\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  }\n\n  /** Returns the store endpoint URL. */\n  public getStoreEndpoint(): string {\n    return this._getIngestEndpoint('store');\n  }\n\n  /** Returns the envelope endpoint URL. */\n  private _getEnvelopeEndpoint(): string {\n    return this._getIngestEndpoint('envelope');\n  }\n\n  /** Returns the ingest API endpoint for target. */\n  private _getIngestEndpoint(target: 'store' | 'envelope'): string {\n    const base = this.getBaseApiEndpoint();\n    const dsn = this._dsnObject;\n    return `${base}${dsn.projectId}/${target}/`;\n  }\n\n  /**\n   * Returns the store endpoint URL with auth in the query string.\n   *\n   * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n   */\n  public getStoreEndpointWithUrlEncodedAuth(): string {\n    return `${this.getStoreEndpoint()}?${this._encodedAuth()}`;\n  }\n\n  /**\n   * Returns the envelope endpoint URL with auth in the query string.\n   *\n   * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n   */\n  public getEnvelopeEndpointWithUrlEncodedAuth(): string {\n    return `${this._getEnvelopeEndpoint()}?${this._encodedAuth()}`;\n  }\n\n  /** Returns a URL-encoded string with auth config suitable for a query string. */\n  private _encodedAuth(): string {\n    const dsn = this._dsnObject;\n    const auth = {\n      // We send only the minimum set of required information. See\n      // https://github.com/getsentry/sentry-javascript/issues/2572.\n      sentry_key: dsn.user,\n      sentry_version: SENTRY_API_VERSION,\n    };\n    return urlEncode(auth);\n  }\n\n  /** Returns only the path component for the store endpoint. */\n  public getStoreEndpointPath(): string {\n    const dsn = this._dsnObject;\n    return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n  }\n\n  /**\n   * Returns an object that can be used in request headers.\n   * This is needed for node and the old /store endpoint in sentry\n   */\n  public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n    const dsn = this._dsnObject;\n    const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n    header.push(`sentry_client=${clientName}/${clientVersion}`);\n    header.push(`sentry_key=${dsn.user}`);\n    if (dsn.pass) {\n      header.push(`sentry_secret=${dsn.pass}`);\n    }\n    return {\n      'Content-Type': 'application/json',\n      'X-Sentry-Auth': header.join(', '),\n    };\n  }\n\n  /** Returns the url to the report dialog endpoint. */\n  public getReportDialogEndpoint(\n    dialogOptions: {\n      [key: string]: any;\n      user?: { name?: string; email?: string };\n    } = {},\n  ): string {\n    const dsn = this._dsnObject;\n    const endpoint = `${this.getBaseApiEndpoint()}embed/error-page/`;\n\n    const encodedOptions = [];\n    encodedOptions.push(`dsn=${dsn.toString()}`);\n    for (const key in dialogOptions) {\n      if (key === 'user') {\n        if (!dialogOptions.user) {\n          continue;\n        }\n        if (dialogOptions.user.name) {\n          encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n        }\n        if (dialogOptions.user.email) {\n          encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n        }\n      } else {\n        encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n      }\n    }\n    if (encodedOptions.length) {\n      return `${endpoint}?${encodedOptions.join('&')}`;\n    }\n\n    return endpoint;\n  }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport interface IntegrationIndex {\n  [key: string]: Integration;\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n  const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n  const userIntegrations = options.integrations;\n  let integrations: Integration[] = [];\n  if (Array.isArray(userIntegrations)) {\n    const userIntegrationsNames = userIntegrations.map(i => i.name);\n    const pickedIntegrationsNames: string[] = [];\n\n    // Leave only unique default integrations, that were not overridden with provided user integrations\n    defaultIntegrations.forEach(defaultIntegration => {\n      if (\n        userIntegrationsNames.indexOf(defaultIntegration.name) === -1 &&\n        pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1\n      ) {\n        integrations.push(defaultIntegration);\n        pickedIntegrationsNames.push(defaultIntegration.name);\n      }\n    });\n\n    // Don't add same user integration twice\n    userIntegrations.forEach(userIntegration => {\n      if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) {\n        integrations.push(userIntegration);\n        pickedIntegrationsNames.push(userIntegration.name);\n      }\n    });\n  } else if (typeof userIntegrations === 'function') {\n    integrations = userIntegrations(defaultIntegrations);\n    integrations = Array.isArray(integrations) ? integrations : [integrations];\n  } else {\n    integrations = [...defaultIntegrations];\n  }\n\n  // Make sure that if present, `Debug` integration will always run last\n  const integrationsNames = integrations.map(i => i.name);\n  const alwaysLastToRun = 'Debug';\n  if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n    integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n  }\n\n  return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n  if (installedIntegrations.indexOf(integration.name) !== -1) {\n    return;\n  }\n  integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n  installedIntegrations.push(integration.name);\n  logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations<O extends Options>(options: O): IntegrationIndex {\n  const integrations: IntegrationIndex = {};\n  getIntegrationsToSetup(options).forEach(integration => {\n    integrations[integration.name] = integration;\n    setupIntegration(integration);\n  });\n  return integrations;\n}\n","import { Scope } from '@sentry/hub';\nimport { Client, Event, EventHint, Integration, IntegrationClass, Options, Severity } from '@sentry/types';\nimport {\n  Dsn,\n  isPrimitive,\n  isThenable,\n  logger,\n  normalize,\n  SyncPromise,\n  timestampWithMs,\n  truncate,\n  uuid4,\n} from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeBackend, NodeOptions> {\n *   public constructor(options: NodeOptions) {\n *     super(NodeBackend, options);\n *   }\n *\n *   // ...\n * }\n */\nexport abstract class BaseClient<B extends Backend, O extends Options> implements Client<O> {\n  /**\n   * The backend used to physically interact in the environment. Usually, this\n   * will correspond to the client. When composing SDKs, however, the Backend\n   * from the root SDK will be used.\n   */\n  protected readonly _backend: B;\n\n  /** Options passed to the SDK. */\n  protected readonly _options: O;\n\n  /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n  protected readonly _dsn?: Dsn;\n\n  /** Array of used integrations. */\n  protected _integrations: IntegrationIndex = {};\n\n  /** Is the client still processing a call? */\n  protected _processing: boolean = false;\n\n  /**\n   * Initializes this client instance.\n   *\n   * @param backendClass A constructor function to create the backend.\n   * @param options Options for the client.\n   */\n  protected constructor(backendClass: BackendClass<B, O>, options: O) {\n    this._backend = new backendClass(options);\n    this._options = options;\n\n    if (options.dsn) {\n      this._dsn = new Dsn(options.dsn);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n    let eventId: string | undefined = hint && hint.event_id;\n    this._processing = true;\n\n    this._getBackend()\n      .eventFromException(exception, hint)\n      .then(event => {\n        eventId = this.captureEvent(event, hint, scope);\n      });\n\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n    let eventId: string | undefined = hint && hint.event_id;\n    this._processing = true;\n\n    const promisedEvent = isPrimitive(message)\n      ? this._getBackend().eventFromMessage(`${message}`, level, hint)\n      : this._getBackend().eventFromException(message, hint);\n\n    promisedEvent.then(event => {\n      eventId = this.captureEvent(event, hint, scope);\n    });\n\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n    let eventId: string | undefined = hint && hint.event_id;\n    this._processing = true;\n\n    this._processEvent(event, hint, scope)\n      .then(finalEvent => {\n        // We need to check for finalEvent in case beforeSend returned null\n        eventId = finalEvent && finalEvent.event_id;\n        this._processing = false;\n      })\n      .then(null, reason => {\n        logger.error(reason);\n        this._processing = false;\n      });\n\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public getDsn(): Dsn | undefined {\n    return this._dsn;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public getOptions(): O {\n    return this._options;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public flush(timeout?: number): PromiseLike<boolean> {\n    return this._isClientProcessing(timeout).then(status => {\n      clearInterval(status.interval);\n      return this._getBackend()\n        .getTransport()\n        .close(timeout)\n        .then(transportFlushed => status.ready && transportFlushed);\n    });\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public close(timeout?: number): PromiseLike<boolean> {\n    return this.flush(timeout).then(result => {\n      this.getOptions().enabled = false;\n      return result;\n    });\n  }\n\n  /**\n   * Sets up the integrations\n   */\n  public setupIntegrations(): void {\n    if (this._isEnabled()) {\n      this._integrations = setupIntegrations(this._options);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null {\n    try {\n      return (this._integrations[integration.id] as T) || null;\n    } catch (_oO) {\n      logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n      return null;\n    }\n  }\n\n  /** Waits for the client to be done with processing. */\n  protected _isClientProcessing(timeout?: number): PromiseLike<{ ready: boolean; interval: number }> {\n    return new SyncPromise<{ ready: boolean; interval: number }>(resolve => {\n      let ticked: number = 0;\n      const tick: number = 1;\n\n      let interval = 0;\n      clearInterval(interval);\n\n      interval = (setInterval(() => {\n        if (!this._processing) {\n          resolve({\n            interval,\n            ready: true,\n          });\n        } else {\n          ticked += tick;\n          if (timeout && ticked >= timeout) {\n            resolve({\n              interval,\n              ready: false,\n            });\n          }\n        }\n      }, tick) as unknown) as number;\n    });\n  }\n\n  /** Returns the current backend. */\n  protected _getBackend(): B {\n    return this._backend;\n  }\n\n  /** Determines whether this SDK is enabled and a valid Dsn is present. */\n  protected _isEnabled(): boolean {\n    return this.getOptions().enabled !== false && this._dsn !== undefined;\n  }\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 scope A scope containing event metadata.\n   * @returns A new event with more information.\n   */\n  protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike<Event | null> {\n    const { normalizeDepth = 3 } = this.getOptions();\n    const prepared: Event = {\n      ...event,\n      event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()),\n      timestamp: event.timestamp || timestampWithMs(),\n    };\n\n    this._applyClientOptions(prepared);\n    this._applyIntegrationsMetadata(prepared);\n\n    // If we have scope given to us, use it as the base for further modifications.\n    // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n    let finalScope = scope;\n    if (hint && hint.captureContext) {\n      finalScope = Scope.clone(finalScope).update(hint.captureContext);\n    }\n\n    // We prepare the result here with a resolved Event.\n    let result = SyncPromise.resolve<Event | null>(prepared);\n\n    // This should be the last thing called, since we want that\n    // {@link Hub.addEventProcessor} gets the finished prepared event.\n    if (finalScope) {\n      // In case we have a hub we reassign it.\n      result = finalScope.applyToEvent(prepared, hint);\n    }\n\n    return result.then(evt => {\n      // tslint:disable-next-line:strict-type-predicates\n      if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n        return this._normalizeEvent(evt, normalizeDepth);\n      }\n      return evt;\n    });\n  }\n\n  /**\n   * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n   * Normalized keys:\n   * - `breadcrumbs.data`\n   * - `user`\n   * - `contexts`\n   * - `extra`\n   * @param event Event\n   * @returns Normalized event\n   */\n  protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n    if (!event) {\n      return null;\n    }\n\n    // tslint:disable:no-unsafe-any\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),\n          }),\n        })),\n      }),\n      ...(event.user && {\n        user: normalize(event.user, depth),\n      }),\n      ...(event.contexts && {\n        contexts: normalize(event.contexts, depth),\n      }),\n      ...(event.extra && {\n        extra: normalize(event.extra, depth),\n      }),\n    };\n    // event.contexts.trace stores information about a Transaction. Similarly,\n    // event.spans[] stores information about child Spans. Given that a\n    // Transaction is conceptually a Span, normalization should apply to both\n    // Transactions and Spans consistently.\n    // For now the decision is to skip normalization of Transactions and Spans,\n    // so this block overwrites the normalized event to add back the original\n    // Transaction information prior to normalization.\n    if (event.contexts && event.contexts.trace) {\n      normalized.contexts.trace = event.contexts.trace;\n    }\n    return normalized;\n  }\n\n  /**\n   *  Enhances event using the client configuration.\n   *  It takes care of all \"static\" values like environment, release and `dist`,\n   *  as well as truncating overly long values.\n   * @param event event instance to be enhanced\n   */\n  protected _applyClientOptions(event: Event): void {\n    const { environment, release, dist, maxValueLength = 250 } = this.getOptions();\n\n    if (event.environment === undefined && environment !== undefined) {\n      event.environment = environment;\n    }\n\n    if (event.release === undefined && release !== undefined) {\n      event.release = release;\n    }\n\n    if (event.dist === undefined && dist !== undefined) {\n      event.dist = dist;\n    }\n\n    if (event.message) {\n      event.message = truncate(event.message, maxValueLength);\n    }\n\n    const exception = event.exception && event.exception.values && event.exception.values[0];\n    if (exception && exception.value) {\n      exception.value = truncate(exception.value, maxValueLength);\n    }\n\n    const request = event.request;\n    if (request && request.url) {\n      request.url = truncate(request.url, maxValueLength);\n    }\n  }\n\n  /**\n   * This function adds all used integrations to the SDK info in the event.\n   * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n   */\n  protected _applyIntegrationsMetadata(event: Event): void {\n    const sdkInfo = event.sdk;\n    const integrationsArray = Object.keys(this._integrations);\n    if (sdkInfo && integrationsArray.length > 0) {\n      sdkInfo.integrations = integrationsArray;\n    }\n  }\n\n  /**\n   * Tells the backend to send this event\n   * @param event The Sentry event to send\n   */\n  protected _sendEvent(event: Event): void {\n    this._getBackend().sendEvent(event);\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 scope 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  protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike<Event> {\n    const { beforeSend, sampleRate } = this.getOptions();\n\n    if (!this._isEnabled()) {\n      return SyncPromise.reject('SDK not enabled, will not send event.');\n    }\n\n    const isTransaction = event.type === 'transaction';\n    // 1.0 === 100% events are sent\n    // 0.0 === 0% events are sent\n    // Sampling for transaction happens somewhere else\n    if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n      return SyncPromise.reject('This event has been sampled, will not send event.');\n    }\n\n    return new SyncPromise((resolve, reject) => {\n      this._prepareEvent(event, scope, hint)\n        .then(prepared => {\n          if (prepared === null) {\n            reject('An event processor returned null, will not send event.');\n            return;\n          }\n\n          let finalEvent: Event | null = prepared;\n\n          const isInternalException = hint && hint.data && (hint.data as { [key: string]: any }).__sentry__ === true;\n          // We skip beforeSend in case of transactions\n          if (isInternalException || !beforeSend || isTransaction) {\n            this._sendEvent(finalEvent);\n            resolve(finalEvent);\n            return;\n          }\n\n          const beforeSendResult = beforeSend(prepared, hint);\n          // tslint:disable-next-line:strict-type-predicates\n          if (typeof beforeSendResult === 'undefined') {\n            logger.error('`beforeSend` method has to return `null` or a valid event.');\n          } else if (isThenable(beforeSendResult)) {\n            this._handleAsyncBeforeSend(beforeSendResult as PromiseLike<Event | null>, resolve, reject);\n          } else {\n            finalEvent = beforeSendResult as Event | null;\n\n            if (finalEvent === null) {\n              logger.log('`beforeSend` returned `null`, will not send event.');\n              resolve(null);\n              return;\n            }\n\n            // From here on we are really async\n            this._sendEvent(finalEvent);\n            resolve(finalEvent);\n          }\n        })\n        .then(null, reason => {\n          this.captureException(reason, {\n            data: {\n              __sentry__: true,\n            },\n            originalException: reason as Error,\n          });\n          reject(\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\n  /**\n   * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n   */\n  private _handleAsyncBeforeSend(\n    beforeSend: PromiseLike<Event | null>,\n    resolve: (event: Event) => void,\n    reject: (reason: string) => void,\n  ): void {\n    beforeSend\n      .then(processedEvent => {\n        if (processedEvent === null) {\n          reject('`beforeSend` returned `null`, will not send event.');\n          return;\n        }\n        // From here on we are really async\n        this._sendEvent(processedEvent);\n        resolve(processedEvent);\n      })\n      .then(null, e => {\n        reject(`beforeSend rejected with ${e}`);\n      });\n  }\n}\n","import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n  /**\n   * @inheritDoc\n   */\n  public sendEvent(_: Event): PromiseLike<Response> {\n    return SyncPromise.resolve({\n      reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n      status: Status.Skipped,\n    });\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public close(_?: number): PromiseLike<boolean> {\n    return SyncPromise.resolve(true);\n  }\n}\n","import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instanciate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n  /** Creates a {@link Event} from an exception. */\n  eventFromException(exception: any, hint?: EventHint): PromiseLike<Event>;\n\n  /** Creates a {@link Event} from a plain message. */\n  eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike<Event>;\n\n  /** Submits the event to Sentry */\n  sendEvent(event: Event): void;\n\n  /**\n   * Returns the transport that is used by the backend.\n   * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n   *\n   * @returns The transport.\n   */\n  getTransport(): Transport;\n}\n\n/**\n * A class object that can instanciate Backend objects.\n * @hidden\n */\nexport type BackendClass<B extends Backend, O extends Options> = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend<O extends Options> implements Backend {\n  /** Options passed to the SDK. */\n  protected readonly _options: O;\n\n  /** Cached transport used internally. */\n  protected _transport: Transport;\n\n  /** Creates a new backend instance. */\n  public constructor(options: O) {\n    this._options = options;\n    if (!this._options.dsn) {\n      logger.warn('No DSN provided, backend will not do anything.');\n    }\n    this._transport = this._setupTransport();\n  }\n\n  /**\n   * Sets up the transport so it can be used later to send requests.\n   */\n  protected _setupTransport(): Transport {\n    return new NoopTransport();\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromException(_exception: any, _hint?: EventHint): PromiseLike<Event> {\n    throw new SentryError('Backend has to implement `eventFromException` method');\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike<Event> {\n    throw new SentryError('Backend has to implement `eventFromMessage` method');\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public sendEvent(event: Event): void {\n    this._transport.sendEvent(event).then(null, reason => {\n      logger.error(`Error while sending event: ${reason}`);\n    });\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public getTransport(): Transport {\n    return this._transport;\n  }\n}\n","import { Event } from '@sentry/types';\nimport { timestampWithMs } from '@sentry/utils';\n\nimport { API } from './api';\n\n/** A generic client request. */\ninterface SentryRequest {\n  body: string;\n  url: string;\n  // headers would contain auth & content-type headers for @sentry/node, but\n  // since @sentry/browser avoids custom headers to prevent CORS preflight\n  // requests, we can use the same approach for @sentry/browser and @sentry/node\n  // for simplicity -- no headers involved.\n  // headers: { [key: string]: string };\n}\n\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event: Event, api: API): SentryRequest {\n  const useEnvelope = event.type === 'transaction';\n\n  const req: SentryRequest = {\n    body: JSON.stringify(event),\n    url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n  };\n\n  // https://develop.sentry.dev/sdk/envelopes/\n\n  // Since we don't need to manipulate envelopes nor store them, there is no\n  // exported concept of an Envelope with operations including serialization and\n  // deserialization. Instead, we only implement a minimal subset of the spec to\n  // serialize events inline here.\n  if (useEnvelope) {\n    const envelopeHeaders = JSON.stringify({\n      event_id: event.event_id,\n      // We need to add * 1000 since we divide it by 1000 by default but JS works with ms precision\n      // The reason we use timestampWithMs here is that all clocks across the SDK use the same clock\n      sent_at: new Date(timestampWithMs() * 1000).toISOString(),\n    });\n    const itemHeaders = JSON.stringify({\n      type: event.type,\n      // The content-type is assumed to be 'application/json' and not part of\n      // the current spec for transaction items, so we don't bloat the request\n      // body with it.\n      //\n      // content_type: 'application/json',\n      //\n      // The length is optional. It must be the number of bytes in req.Body\n      // encoded as UTF-8. Since the server can figure this out and would\n      // otherwise refuse events that report the length incorrectly, we decided\n      // not to send the length to avoid problems related to reporting the wrong\n      // size and to reduce request body size.\n      //\n      // length: new TextEncoder().encode(req.body).length,\n    });\n    // The trailing newline is optional. We intentionally don't send it to avoid\n    // sending unnecessary bytes.\n    //\n    // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n    const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}`;\n    req.body = envelope;\n  }\n\n  return req;\n}\n","import { getCurrentHub } from '@sentry/hub';\nimport { Client, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** A class object that can instanciate Client objects. */\nexport type ClientClass<F extends Client, O extends Options> = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind<F extends Client, O extends Options>(clientClass: ClientClass<F, O>, options: O): void {\n  if (options.debug === true) {\n    logger.enable();\n  }\n  const hub = getCurrentHub();\n  const client = new clientClass(options);\n  hub.bindClient(client);\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public name: string = FunctionToString.id;\n\n  /**\n   * @inheritDoc\n   */\n  public static id: string = 'FunctionToString';\n\n  /**\n   * @inheritDoc\n   */\n  public setupOnce(): void {\n    originalFunctionToString = Function.prototype.toString;\n\n    Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n      const context = this.__sentry_original__ || this;\n      // tslint:disable-next-line:no-unsafe-any\n      return originalFunctionToString.apply(context, args);\n    };\n  }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n  blacklistUrls?: Array<string | RegExp>;\n  ignoreErrors?: Array<string | RegExp>;\n  ignoreInternal?: boolean;\n  whitelistUrls?: Array<string | RegExp>;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public name: string = InboundFilters.id;\n  /**\n   * @inheritDoc\n   */\n  public static id: string = 'InboundFilters';\n\n  public constructor(private readonly _options: InboundFiltersOptions = {}) {}\n\n  /**\n   * @inheritDoc\n   */\n  public setupOnce(): void {\n    addGlobalEventProcessor((event: Event) => {\n      const hub = getCurrentHub();\n      if (!hub) {\n        return event;\n      }\n      const self = hub.getIntegration(InboundFilters);\n      if (self) {\n        const client = hub.getClient();\n        const clientOptions = client ? client.getOptions() : {};\n        const options = self._mergeOptions(clientOptions);\n        if (self._shouldDropEvent(event, options)) {\n          return null;\n        }\n      }\n      return event;\n    });\n  }\n\n  /** JSDoc */\n  private _shouldDropEvent(event: Event, options: InboundFiltersOptions): boolean {\n    if (this._isSentryError(event, options)) {\n      logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n      return true;\n    }\n    if (this._isIgnoredError(event, options)) {\n      logger.warn(\n        `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n      );\n      return true;\n    }\n    if (this._isBlacklistedUrl(event, options)) {\n      logger.warn(\n        `Event dropped due to being matched by \\`blacklistUrls\\` option.\\nEvent: ${getEventDescription(\n          event,\n        )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n      );\n      return true;\n    }\n    if (!this._isWhitelistedUrl(event, options)) {\n      logger.warn(\n        `Event dropped due to not being matched by \\`whitelistUrls\\` option.\\nEvent: ${getEventDescription(\n          event,\n        )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n      );\n      return true;\n    }\n    return false;\n  }\n\n  /** JSDoc */\n  private _isSentryError(event: Event, options: InboundFiltersOptions = {}): boolean {\n    if (!options.ignoreInternal) {\n      return false;\n    }\n\n    try {\n      return (\n        (event &&\n          event.exception &&\n          event.exception.values &&\n          event.exception.values[0] &&\n          event.exception.values[0].type === 'SentryError') ||\n        false\n      );\n    } catch (_oO) {\n      return false;\n    }\n  }\n\n  /** JSDoc */\n  private _isIgnoredError(event: Event, options: InboundFiltersOptions = {}): boolean {\n    if (!options.ignoreErrors || !options.ignoreErrors.length) {\n      return false;\n    }\n\n    return this._getPossibleEventMessages(event).some(message =>\n      // Not sure why TypeScript complains here...\n      (options.ignoreErrors as Array<RegExp | string>).some(pattern => isMatchingPattern(message, pattern)),\n    );\n  }\n\n  /** JSDoc */\n  private _isBlacklistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n    // TODO: Use Glob instead?\n    if (!options.blacklistUrls || !options.blacklistUrls.length) {\n      return false;\n    }\n    const url = this._getEventFilterUrl(event);\n    return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern));\n  }\n\n  /** JSDoc */\n  private _isWhitelistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n    // TODO: Use Glob instead?\n    if (!options.whitelistUrls || !options.whitelistUrls.length) {\n      return true;\n    }\n    const url = this._getEventFilterUrl(event);\n    return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern));\n  }\n\n  /** JSDoc */\n  private _mergeOptions(clientOptions: InboundFiltersOptions = {}): InboundFiltersOptions {\n    return {\n      blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])],\n      ignoreErrors: [\n        ...(this._options.ignoreErrors || []),\n        ...(clientOptions.ignoreErrors || []),\n        ...DEFAULT_IGNORE_ERRORS,\n      ],\n      ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n      whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])],\n    };\n  }\n\n  /** JSDoc */\n  private _getPossibleEventMessages(event: Event): string[] {\n    if (event.message) {\n      return [event.message];\n    }\n    if (event.exception) {\n      try {\n        const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n        return [`${value}`, `${type}: ${value}`];\n      } catch (oO) {\n        logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n        return [];\n      }\n    }\n    return [];\n  }\n\n  /** JSDoc */\n  private _getEventFilterUrl(event: Event): string | null {\n    try {\n      if (event.stacktrace) {\n        const frames = event.stacktrace.frames;\n        return (frames && frames[frames.length - 1].filename) || null;\n      }\n      if (event.exception) {\n        const frames =\n          event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n        return (frames && frames[frames.length - 1].filename) || null;\n      }\n      return null;\n    } catch (oO) {\n      logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n      return null;\n    }\n  }\n}\n","// tslint:disable:object-literal-sort-keys\n\n/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n  url: string;\n  func: string;\n  args: string[];\n  line: number | null;\n  column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n  name: string;\n  message: string;\n  mechanism?: string;\n  stack: StackFrame[];\n  failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n/** JSDoc */\nexport function computeStackTrace(ex: any): StackTrace {\n  // tslint:disable:no-unsafe-any\n\n  let stack = null;\n  const popSize: number = ex && ex.framesToPop;\n\n  try {\n    // This must be tried first because Opera 10 *destroys*\n    // its stacktrace property if you try to access the stack\n    // property first!!\n    stack = computeStackTraceFromStacktraceProp(ex);\n    if (stack) {\n      return popFrames(stack, popSize);\n    }\n  } catch (e) {\n    // no-empty\n  }\n\n  try {\n    stack = computeStackTraceFromStackProp(ex);\n    if (stack) {\n      return popFrames(stack, popSize);\n    }\n  } catch (e) {\n    // no-empty\n  }\n\n  return {\n    message: extractMessage(ex),\n    name: ex && ex.name,\n    stack: [],\n    failed: true,\n  };\n}\n\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n  // tslint:disable:no-conditional-assignment\n  if (!ex || !ex.stack) {\n    return null;\n  }\n\n  const stack = [];\n  const lines = ex.stack.split('\\n');\n  let isEval;\n  let submatch;\n  let parts;\n  let element;\n\n  for (let i = 0; i < lines.length; ++i) {\n    if ((parts = chrome.exec(lines[i]))) {\n      const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n      isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n      if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n        // throw out eval line/column and use top-most line/column number\n        parts[2] = submatch[1]; // url\n        parts[3] = submatch[2]; // line\n        parts[4] = submatch[3]; // column\n      }\n      element = {\n        // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n        // prefix here seems like the quickest solution for now.\n        url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n        func: parts[1] || UNKNOWN_FUNCTION,\n        args: isNative ? [parts[2]] : [],\n        line: parts[3] ? +parts[3] : null,\n        column: parts[4] ? +parts[4] : null,\n      };\n    } else if ((parts = winjs.exec(lines[i]))) {\n      element = {\n        url: parts[2],\n        func: parts[1] || UNKNOWN_FUNCTION,\n        args: [],\n        line: +parts[3],\n        column: parts[4] ? +parts[4] : null,\n      };\n    } else if ((parts = gecko.exec(lines[i]))) {\n      isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n      if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n        // throw out eval line/column and use top-most line number\n        parts[1] = parts[1] || `eval`;\n        parts[3] = submatch[1];\n        parts[4] = submatch[2];\n        parts[5] = ''; // no column when eval\n      } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n        // FireFox uses this awesome columnNumber property for its top frame\n        // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n        // so adding 1\n        // NOTE: this hack doesn't work if top-most frame is eval\n        stack[0].column = (ex.columnNumber as number) + 1;\n      }\n      element = {\n        url: parts[3],\n        func: parts[1] || UNKNOWN_FUNCTION,\n        args: parts[2] ? parts[2].split(',') : [],\n        line: parts[4] ? +parts[4] : null,\n        column: parts[5] ? +parts[5] : null,\n      };\n    } else {\n      continue;\n    }\n\n    if (!element.func && element.line) {\n      element.func = UNKNOWN_FUNCTION;\n    }\n\n    stack.push(element);\n  }\n\n  if (!stack.length) {\n    return null;\n  }\n\n  return {\n    message: extractMessage(ex),\n    name: ex.name,\n    stack,\n  };\n}\n\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n  if (!ex || !ex.stacktrace) {\n    return null;\n  }\n  // Access and store the stacktrace property before doing ANYTHING\n  // else to it because Opera is not very good at providing it\n  // reliably in other circumstances.\n  const stacktrace = ex.stacktrace;\n  const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n  const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n  const lines = stacktrace.split('\\n');\n  const stack = [];\n  let parts;\n\n  for (let line = 0; line < lines.length; line += 2) {\n    // tslint:disable:no-conditional-assignment\n    let element = null;\n    if ((parts = opera10Regex.exec(lines[line]))) {\n      element = {\n        url: parts[2],\n        func: parts[3],\n        args: [],\n        line: +parts[1],\n        column: null,\n      };\n    } else if ((parts = opera11Regex.exec(lines[line]))) {\n      element = {\n        url: parts[6],\n        func: parts[3] || parts[4],\n        args: parts[5] ? parts[5].split(',') : [],\n        line: +parts[1],\n        column: +parts[2],\n      };\n    }\n\n    if (element) {\n      if (!element.func && element.line) {\n        element.func = UNKNOWN_FUNCTION;\n      }\n      stack.push(element);\n    }\n  }\n\n  if (!stack.length) {\n    return null;\n  }\n\n  return {\n    message: extractMessage(ex),\n    name: ex.name,\n    stack,\n  };\n}\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n  try {\n    return {\n      ...stacktrace,\n      stack: stacktrace.stack.slice(popSize),\n    };\n  } catch (e) {\n    return stacktrace;\n  }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: any): string {\n  const message = ex && ex.message;\n  if (!message) {\n    return 'No error message';\n  }\n  if (message.error && typeof message.error.message === 'string') {\n    return message.error.message;\n  }\n  return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n  const frames = prepareFramesForEvent(stacktrace.stack);\n\n  const exception: Exception = {\n    type: stacktrace.name,\n    value: stacktrace.message,\n  };\n\n  if (frames && frames.length) {\n    exception.stacktrace = { frames };\n  }\n\n  // tslint:disable-next-line:strict-type-predicates\n  if (exception.type === undefined && exception.value === '') {\n    exception.value = 'Unrecoverable error caught';\n  }\n\n  return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event {\n  const event: Event = {\n    exception: {\n      values: [\n        {\n          type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n          value: `Non-Error ${\n            rejection ? 'promise rejection' : 'exception'\n          } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n        },\n      ],\n    },\n    extra: {\n      __serialized__: normalizeToSize(exception),\n    },\n  };\n\n  if (syntheticException) {\n    const stacktrace = computeStackTrace(syntheticException);\n    const frames = prepareFramesForEvent(stacktrace.stack);\n    event.stacktrace = {\n      frames,\n    };\n  }\n\n  return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n  const exception = exceptionFromStacktrace(stacktrace);\n\n  return {\n    exception: {\n      values: [exception],\n    },\n  };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n  if (!stack || !stack.length) {\n    return [];\n  }\n\n  let localStack = stack;\n\n  const firstFrameFunction = localStack[0].func || '';\n  const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n  // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n  if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n    localStack = localStack.slice(1);\n  }\n\n  // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n  if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n    localStack = localStack.slice(0, -1);\n  }\n\n  // The frame where the crash happened, should be the last entry in the array\n  return localStack\n    .slice(0, STACKTRACE_LIMIT)\n    .map(\n      (frame: TraceKitStackFrame): StackFrame => ({\n        colno: frame.column === null ? undefined : frame.column,\n        filename: frame.url || localStack[0].url,\n        function: frame.func || '?',\n        in_app: true,\n        lineno: frame.line === null ? undefined : frame.line,\n      }),\n    )\n    .reverse();\n}\n","import { Event } from '@sentry/types';\nimport {\n  addExceptionMechanism,\n  addExceptionTypeValue,\n  isDOMError,\n  isDOMException,\n  isError,\n  isErrorEvent,\n  isEvent,\n  isPlainObject,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/** JSDoc */\nexport function eventFromUnknownInput(\n  exception: unknown,\n  syntheticException?: Error,\n  options: {\n    rejection?: boolean;\n    attachStacktrace?: boolean;\n  } = {},\n): Event {\n  let event: Event;\n\n  if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n    // If it is an ErrorEvent with `error` property, extract it to get actual Error\n    const errorEvent = exception as ErrorEvent;\n    exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n    event = eventFromStacktrace(computeStackTrace(exception as Error));\n    return event;\n  }\n  if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n    // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n    // then we just extract the name and message, as they don't provide anything else\n    // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n    // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n    const domException = exception as DOMException;\n    const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n    const message = domException.message ? `${name}: ${domException.message}` : name;\n\n    event = eventFromString(message, syntheticException, options);\n    addExceptionTypeValue(event, message);\n    return event;\n  }\n  if (isError(exception as Error)) {\n    // we have a real Error object, do nothing\n    event = eventFromStacktrace(computeStackTrace(exception as Error));\n    return event;\n  }\n  if (isPlainObject(exception) || isEvent(exception)) {\n    // If it is plain Object or Event, serialize it manually and extract options\n    // This will allow us to group events based on top-level keys\n    // which is much better than creating new group when any key/value change\n    const objectException = exception as {};\n    event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n    addExceptionMechanism(event, {\n      synthetic: true,\n    });\n    return event;\n  }\n\n  // If none of previous checks were valid, then it means that it's not:\n  // - an instance of DOMError\n  // - an instance of DOMException\n  // - an instance of Event\n  // - an instance of Error\n  // - a valid ErrorEvent (one with an error property)\n  // - a plain Object\n  //\n  // So bail out and capture it as a simple message:\n  event = eventFromString(exception as string, syntheticException, options);\n  addExceptionTypeValue(event, `${exception}`, undefined);\n  addExceptionMechanism(event, {\n    synthetic: true,\n  });\n\n  return event;\n}\n\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(\n  input: string,\n  syntheticException?: Error,\n  options: {\n    attachStacktrace?: boolean;\n  } = {},\n): Event {\n  const event: Event = {\n    message: input,\n  };\n\n  if (options.attachStacktrace && syntheticException) {\n    const stacktrace = computeStackTrace(syntheticException);\n    const frames = prepareFramesForEvent(stacktrace.stack);\n    event.stacktrace = {\n      frames,\n    };\n  }\n\n  return event;\n}\n","import { API } from '@sentry/core';\nimport { Event, Response, Transport, TransportOptions } from '@sentry/types';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n  /**\n   * @deprecated\n   */\n  public url: string;\n\n  /** Helper to get Sentry API endpoints. */\n  protected readonly _api: API;\n\n  /** A simple buffer holding all requests. */\n  protected readonly _buffer: PromiseBuffer<Response> = new PromiseBuffer(30);\n\n  public constructor(public options: TransportOptions) {\n    this._api = new API(this.options.dsn);\n    // tslint:disable-next-line:deprecation\n    this.url = this._api.getStoreEndpointWithUrlEncodedAuth();\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public sendEvent(_: Event): PromiseLike<Response> {\n    throw new SentryError('Transport Class has to implement `sendEvent` method');\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public close(timeout?: number): PromiseLike<boolean> {\n    return this._buffer.drain(timeout);\n  }\n}\n","import { eventToSentryRequest } from '@sentry/core';\nimport { Event, Response, Status } from '@sentry/types';\nimport { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\nconst global = getGlobalObject<Window>();\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n  /** Locks transport after receiving 429 response */\n  private _disabledUntil: Date = new Date(Date.now());\n\n  /**\n   * @inheritDoc\n   */\n  public sendEvent(event: Event): PromiseLike<Response> {\n    if (new Date(Date.now()) < this._disabledUntil) {\n      return Promise.reject({\n        event,\n        reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n        status: 429,\n      });\n    }\n\n    const sentryReq = eventToSentryRequest(event, this._api);\n\n    const options: RequestInit = {\n      body: sentryReq.body,\n      method: 'POST',\n      // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n      // https://caniuse.com/#feat=referrer-policy\n      // It doesn't. And it throw exception instead of ignoring this parameter...\n      // REF: https://github.com/getsentry/raven-js/issues/1233\n      referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n    };\n\n    if (this.options.fetchParameters !== undefined) {\n      Object.assign(options, this.options.fetchParameters);\n    }\n\n    if (this.options.headers !== undefined) {\n      options.headers = this.options.headers;\n    }\n\n    return this._buffer.add(\n      new SyncPromise<Response>((resolve, reject) => {\n        global\n          .fetch(sentryReq.url, options)\n          .then(response => {\n            const status = Status.fromHttpCode(response.status);\n\n            if (status === Status.Success) {\n              resolve({ status });\n              return;\n            }\n\n            if (status === Status.RateLimit) {\n              const now = Date.now();\n              this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n              logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n            }\n\n            reject(response);\n          })\n          .catch(reject);\n      }),\n    );\n  }\n}\n","import { eventToSentryRequest } from '@sentry/core';\nimport { Event, Response, Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n  /** Locks transport after receiving 429 response */\n  private _disabledUntil: Date = new Date(Date.now());\n\n  /**\n   * @inheritDoc\n   */\n  public sendEvent(event: Event): PromiseLike<Response> {\n    if (new Date(Date.now()) < this._disabledUntil) {\n      return Promise.reject({\n        event,\n        reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n        status: 429,\n      });\n    }\n\n    const sentryReq = eventToSentryRequest(event, this._api);\n\n    return this._buffer.add(\n      new SyncPromise<Response>((resolve, reject) => {\n        const request = new XMLHttpRequest();\n\n        request.onreadystatechange = () => {\n          if (request.readyState !== 4) {\n            return;\n          }\n\n          const status = Status.fromHttpCode(request.status);\n\n          if (status === Status.Success) {\n            resolve({ status });\n            return;\n          }\n\n          if (status === Status.RateLimit) {\n            const now = Date.now();\n            this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n            logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n          }\n\n          reject(request);\n        };\n\n        request.open('POST', sentryReq.url);\n        for (const header in this.options.headers) {\n          if (this.options.headers.hasOwnProperty(header)) {\n            request.setRequestHeader(header, this.options.headers[header]);\n          }\n        }\n        request.send(sentryReq.body);\n      }),\n    );\n  }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\n\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n  /**\n   * A pattern for error URLs which should not be sent to Sentry.\n   * To whitelist certain errors instead, use {@link Options.whitelistUrls}.\n   * By default, all errors will be sent.\n   */\n  blacklistUrls?: Array<string | RegExp>;\n\n  /**\n   * A pattern for error URLs which should exclusively be sent to Sentry.\n   * This is the opposite of {@link Options.blacklistUrls}.\n   * By default, all errors will be sent.\n   */\n  whitelistUrls?: Array<string | RegExp>;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend<BrowserOptions> {\n  /**\n   * @inheritDoc\n   */\n  protected _setupTransport(): Transport {\n    if (!this._options.dsn) {\n      // We return the noop transport here in case there is no Dsn.\n      return super._setupTransport();\n    }\n\n    const transportOptions = {\n      ...this._options.transportOptions,\n      dsn: this._options.dsn,\n    };\n\n    if (this._options.transport) {\n      return new this._options.transport(transportOptions);\n    }\n    if (supportsFetch()) {\n      return new FetchTransport(transportOptions);\n    }\n    return new XHRTransport(transportOptions);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromException(exception: any, hint?: EventHint): PromiseLike<Event> {\n    const syntheticException = (hint && hint.syntheticException) || undefined;\n    const event = eventFromUnknownInput(exception, syntheticException, {\n      attachStacktrace: this._options.attachStacktrace,\n    });\n    addExceptionMechanism(event, {\n      handled: true,\n      type: 'generic',\n    });\n    event.level = Severity.Error;\n    if (hint && hint.event_id) {\n      event.event_id = hint.event_id;\n    }\n    return SyncPromise.resolve(event);\n  }\n  /**\n   * @inheritDoc\n   */\n  public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike<Event> {\n    const syntheticException = (hint && hint.syntheticException) || undefined;\n    const event = eventFromString(message, syntheticException, {\n      attachStacktrace: this._options.attachStacktrace,\n    });\n    event.level = level;\n    if (hint && hint.event_id) {\n      event.event_id = hint.event_id;\n    }\n    return SyncPromise.resolve(event);\n  }\n}\n","import { captureException, withScope } from '@sentry/core';\nimport { Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n  return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n  // onerror should trigger before setTimeout\n  ignoreOnError += 1;\n  setTimeout(() => {\n    ignoreOnError -= 1;\n  });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n  fn: WrappedFunction,\n  options: {\n    mechanism?: Mechanism;\n  } = {},\n  before?: WrappedFunction,\n): any {\n  // tslint:disable-next-line:strict-type-predicates\n  if (typeof fn !== 'function') {\n    return fn;\n  }\n\n  try {\n    // We don't wanna wrap it twice\n    if (fn.__sentry__) {\n      return fn;\n    }\n\n    // If this has already been wrapped in the past, return that wrapped function\n    if (fn.__sentry_wrapped__) {\n      return fn.__sentry_wrapped__;\n    }\n  } catch (e) {\n    // Just accessing custom props in some Selenium environments\n    // can cause a \"Permission denied\" exception (see raven-js#495).\n    // Bail on wrapping and return the function as-is (defers to window.onerror).\n    return fn;\n  }\n\n  const sentryWrapped: WrappedFunction = function(this: any): void {\n    const args = Array.prototype.slice.call(arguments);\n\n    // tslint:disable:no-unsafe-any\n    try {\n      // tslint:disable-next-line:strict-type-predicates\n      if (before && typeof before === 'function') {\n        before.apply(this, arguments);\n      }\n\n      const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n      if (fn.handleEvent) {\n        // Attempt to invoke user-land function\n        // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n        //       means the sentry.javascript SDK caught an error invoking your application code. This\n        //       is expected behavior and NOT indicative of a bug with sentry.javascript.\n        return fn.handleEvent.apply(this, wrappedArguments);\n      }\n      // Attempt to invoke user-land function\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n      //       means the sentry.javascript SDK caught an error invoking your application code. This\n      //       is expected behavior and NOT indicative of a bug with sentry.javascript.\n      return fn.apply(this, wrappedArguments);\n      // tslint:enable:no-unsafe-any\n    } catch (ex) {\n      ignoreNextOnError();\n\n      withScope((scope: Scope) => {\n        scope.addEventProcessor((event: SentryEvent) => {\n          const processedEvent = { ...event };\n\n          if (options.mechanism) {\n            addExceptionTypeValue(processedEvent, undefined, undefined);\n            addExceptionMechanism(processedEvent, options.mechanism);\n          }\n\n          processedEvent.extra = {\n            ...processedEvent.extra,\n            arguments: args,\n          };\n\n          return processedEvent;\n        });\n\n        captureException(ex);\n      });\n\n      throw ex;\n    }\n  };\n\n  // Accessing some objects may throw\n  // ref: https://github.com/getsentry/sentry-javascript/issues/1168\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 (_oO) {} // tslint:disable-line:no-empty\n\n  fn.prototype = fn.prototype || {};\n  sentryWrapped.prototype = fn.prototype;\n\n  Object.defineProperty(fn, '__sentry_wrapped__', {\n    enumerable: false,\n    value: sentryWrapped,\n  });\n\n  // Signal that this function has been wrapped/filled already\n  // for both debugging and to prevent it to being wrapped/filled twice\n  Object.defineProperties(sentryWrapped, {\n    __sentry__: {\n      enumerable: false,\n      value: true,\n    },\n    __sentry_original__: {\n      enumerable: false,\n      value: fn,\n    },\n  });\n\n  // Restore original function name (not all browsers allow that)\n  try {\n    const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n    if (descriptor.configurable) {\n      Object.defineProperty(sentryWrapped, 'name', {\n        get(): string {\n          return fn.name;\n        },\n      });\n    }\n  } catch (_oO) {\n    /*no-empty*/\n  }\n\n  return sentryWrapped;\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n  addExceptionMechanism,\n  addInstrumentationHandler,\n  getLocationHref,\n  isErrorEvent,\n  isPrimitive,\n  isString,\n  logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n  onerror: boolean;\n  onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public name: string = GlobalHandlers.id;\n\n  /**\n   * @inheritDoc\n   */\n  public static id: string = 'GlobalHandlers';\n\n  /** JSDoc */\n  private readonly _options: GlobalHandlersIntegrations;\n\n  /** JSDoc */\n  private _onErrorHandlerInstalled: boolean = false;\n\n  /** JSDoc */\n  private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n  /** JSDoc */\n  public constructor(options?: GlobalHandlersIntegrations) {\n    this._options = {\n      onerror: true,\n      onunhandledrejection: true,\n      ...options,\n    };\n  }\n  /**\n   * @inheritDoc\n   */\n  public setupOnce(): void {\n    Error.stackTraceLimit = 50;\n\n    if (this._options.onerror) {\n      logger.log('Global Handler attached: onerror');\n      this._installGlobalOnErrorHandler();\n    }\n\n    if (this._options.onunhandledrejection) {\n      logger.log('Global Handler attached: onunhandledrejection');\n      this._installGlobalOnUnhandledRejectionHandler();\n    }\n  }\n\n  /** JSDoc */\n  private _installGlobalOnErrorHandler(): void {\n    if (this._onErrorHandlerInstalled) {\n      return;\n    }\n\n    addInstrumentationHandler({\n      callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n        const error = data.error;\n        const currentHub = getCurrentHub();\n        const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n        const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n        if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n          return;\n        }\n\n        const client = currentHub.getClient();\n        const event = isPrimitive(error)\n          ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n          : this._enhanceEventWithInitialFrame(\n              eventFromUnknownInput(error, undefined, {\n                attachStacktrace: client && client.getOptions().attachStacktrace,\n                rejection: false,\n              }),\n              data.url,\n              data.line,\n              data.column,\n            );\n\n        addExceptionMechanism(event, {\n          handled: false,\n          type: 'onerror',\n        });\n\n        currentHub.captureEvent(event, {\n          originalException: error,\n        });\n      },\n      type: 'error',\n    });\n\n    this._onErrorHandlerInstalled = true;\n  }\n\n  /** JSDoc */\n  private _installGlobalOnUnhandledRejectionHandler(): void {\n    if (this._onUnhandledRejectionHandlerInstalled) {\n      return;\n    }\n\n    addInstrumentationHandler({\n      callback: (e: any) => {\n        let error = e;\n\n        // dig the object of the rejection out of known event types\n        try {\n          // PromiseRejectionEvents store the object of the rejection under 'reason'\n          // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n          if ('reason' in e) {\n            error = e.reason;\n          }\n          // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n          // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n          // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n          // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n          // https://github.com/getsentry/sentry-javascript/issues/2380\n          else if ('detail' in e && 'reason' in e.detail) {\n            error = e.detail.reason;\n          }\n        } catch (_oO) {\n          // no-empty\n        }\n\n        const currentHub = getCurrentHub();\n        const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n        const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n        if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n          return true;\n        }\n\n        const client = currentHub.getClient();\n        const event = isPrimitive(error)\n          ? this._eventFromIncompleteRejection(error)\n          : eventFromUnknownInput(error, undefined, {\n              attachStacktrace: client && client.getOptions().attachStacktrace,\n              rejection: true,\n            });\n\n        event.level = Severity.Error;\n\n        addExceptionMechanism(event, {\n          handled: false,\n          type: 'onunhandledrejection',\n        });\n\n        currentHub.captureEvent(event, {\n          originalException: error,\n        });\n\n        return;\n      },\n      type: 'unhandledrejection',\n    });\n\n    this._onUnhandledRejectionHandlerInstalled = true;\n  }\n\n  /**\n   * This function creates a stack from an old, error-less onerror handler.\n   */\n  private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n    const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n    // If 'message' is ErrorEvent, get real message from inside\n    let message = isErrorEvent(msg) ? msg.message : msg;\n    let name;\n\n    if (isString(message)) {\n      const groups = message.match(ERROR_TYPES_RE);\n      if (groups) {\n        name = groups[1];\n        message = groups[2];\n      }\n    }\n\n    const event = {\n      exception: {\n        values: [\n          {\n            type: name || 'Error',\n            value: message,\n          },\n        ],\n      },\n    };\n\n    return this._enhanceEventWithInitialFrame(event, url, line, column);\n  }\n\n  /**\n   * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n   */\n  private _eventFromIncompleteRejection(error: any): Event {\n    return {\n      exception: {\n        values: [\n          {\n            type: 'UnhandledRejection',\n            value: `Non-Error promise rejection captured with value: ${error}`,\n          },\n        ],\n      },\n    };\n  }\n\n  /** JSDoc */\n  private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n    event.exception = event.exception || {};\n    event.exception.values = event.exception.values || [];\n    event.exception.values[0] = event.exception.values[0] || {};\n    event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n    event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n    const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n    const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n    const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n    if (event.exception.values[0].stacktrace.frames.length === 0) {\n      event.exception.values[0].stacktrace.frames.push({\n        colno,\n        filename,\n        function: '?',\n        in_app: true,\n        lineno,\n      });\n    }\n\n    return event;\n  }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n  'EventTarget',\n  'Window',\n  'Node',\n  'ApplicationCache',\n  'AudioTrackList',\n  'ChannelMergerNode',\n  'CryptoOperation',\n  'EventSource',\n  'FileReader',\n  'HTMLUnknownElement',\n  'IDBDatabase',\n  'IDBRequest',\n  'IDBTransaction',\n  'KeyOperation',\n  'MediaController',\n  'MessagePort',\n  'ModalWindow',\n  'Notification',\n  'SVGElementInstance',\n  'Screen',\n  'TextTrack',\n  'TextTrackCue',\n  'TextTrackList',\n  'WebSocket',\n  'WebSocketWorker',\n  'Worker',\n  'XMLHttpRequest',\n  'XMLHttpRequestEventTarget',\n  'XMLHttpRequestUpload',\n];\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** JSDoc */\ninterface TryCatchOptions {\n  setTimeout: boolean;\n  setInterval: boolean;\n  requestAnimationFrame: boolean;\n  XMLHttpRequest: boolean;\n  eventTarget: boolean | string[];\n}\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public name: string = TryCatch.id;\n\n  /**\n   * @inheritDoc\n   */\n  public static id: string = 'TryCatch';\n\n  /** JSDoc */\n  private readonly _options: TryCatchOptions;\n\n  /**\n   * @inheritDoc\n   */\n  public constructor(options?: Partial<TryCatchOptions>) {\n    this._options = {\n      XMLHttpRequest: true,\n      eventTarget: true,\n      requestAnimationFrame: true,\n      setInterval: true,\n      setTimeout: true,\n      ...options,\n    };\n  }\n\n  /** JSDoc */\n  private _wrapTimeFunction(original: () => void): () => number {\n    return function(this: any, ...args: any[]): number {\n      const originalCallback = args[0];\n      args[0] = wrap(originalCallback, {\n        mechanism: {\n          data: { function: getFunctionName(original) },\n          handled: true,\n          type: 'instrument',\n        },\n      });\n      return original.apply(this, args);\n    };\n  }\n\n  /** JSDoc */\n  private _wrapRAF(original: any): (callback: () => void) => any {\n    return function(this: any, callback: () => void): () => void {\n      return original.call(\n        this,\n        wrap(callback, {\n          mechanism: {\n            data: {\n              function: 'requestAnimationFrame',\n              handler: getFunctionName(original),\n            },\n            handled: true,\n            type: 'instrument',\n          },\n        }),\n      );\n    };\n  }\n\n  /** JSDoc */\n  private _wrapEventTarget(target: string): void {\n    const global = getGlobalObject() as { [key: string]: any };\n    const proto = global[target] && global[target].prototype;\n\n    if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n      return;\n    }\n\n    fill(proto, 'addEventListener', function(\n      original: () => void,\n    ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n      return function(\n        this: any,\n        eventName: string,\n        fn: EventListenerObject,\n        options?: boolean | AddEventListenerOptions,\n      ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n        try {\n          // tslint:disable-next-line:no-unbound-method strict-type-predicates\n          if (typeof fn.handleEvent === 'function') {\n            fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n              mechanism: {\n                data: {\n                  function: 'handleEvent',\n                  handler: getFunctionName(fn),\n                  target,\n                },\n                handled: true,\n                type: 'instrument',\n              },\n            });\n          }\n        } catch (err) {\n          // can sometimes get 'Permission denied to access property \"handle Event'\n        }\n\n        return original.call(\n          this,\n          eventName,\n          wrap((fn as any) as WrappedFunction, {\n            mechanism: {\n              data: {\n                function: 'addEventListener',\n                handler: getFunctionName(fn),\n                target,\n              },\n              handled: true,\n              type: 'instrument',\n            },\n          }),\n          options,\n        );\n      };\n    });\n\n    fill(proto, 'removeEventListener', function(\n      original: () => void,\n    ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n      return function(\n        this: any,\n        eventName: string,\n        fn: EventListenerObject,\n        options?: boolean | EventListenerOptions,\n      ): () => void {\n        let callback = (fn as any) as WrappedFunction;\n        try {\n          callback = callback && (callback.__sentry_wrapped__ || callback);\n        } catch (e) {\n          // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n        }\n        return original.call(this, eventName, callback, options);\n      };\n    });\n  }\n\n  /** JSDoc */\n  private _wrapXHR(originalSend: () => void): () => void {\n    return function(this: XMLHttpRequest, ...args: any[]): void {\n      const xhr = this; // tslint:disable-line:no-this-assignment\n      const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n      xmlHttpRequestProps.forEach(prop => {\n        if (prop in xhr && typeof xhr[prop] === 'function') {\n          fill(xhr, prop, function(original: WrappedFunction): Function {\n            const wrapOptions = {\n              mechanism: {\n                data: {\n                  function: prop,\n                  handler: getFunctionName(original),\n                },\n                handled: true,\n                type: 'instrument',\n              },\n            };\n\n            // If Instrument integration has been called before TryCatch, get the name of original function\n            if (original.__sentry_original__) {\n              wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n            }\n\n            // Otherwise wrap directly\n            return wrap(original, wrapOptions);\n          });\n        }\n      });\n\n      return originalSend.apply(this, args);\n    };\n  }\n\n  /**\n   * Wrap timer functions and event targets to catch errors\n   * and provide better metadata.\n   */\n  public setupOnce(): void {\n    const global = getGlobalObject();\n\n    if (this._options.setTimeout) {\n      fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n    }\n\n    if (this._options.setInterval) {\n      fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n    }\n\n    if (this._options.requestAnimationFrame) {\n      fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n    }\n\n    if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n      fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n    }\n\n    if (this._options.eventTarget) {\n      const eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;\n      eventTarget.forEach(this._wrapEventTarget.bind(this));\n    }\n  }\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n  addInstrumentationHandler,\n  getEventDescription,\n  getGlobalObject,\n  htmlTreeAsString,\n  parseUrl,\n  safeJoin,\n} from '@sentry/utils';\n\n/**\n * @hidden\n */\nexport interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n  [key: string]: any;\n  __sentry_xhr__?: {\n    method?: string;\n    url?: string;\n    status_code?: number;\n  };\n}\n\n/** JSDoc */\ninterface BreadcrumbsOptions {\n  console: boolean;\n  dom: boolean;\n  fetch: boolean;\n  history: boolean;\n  sentry: boolean;\n  xhr: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public name: string = Breadcrumbs.id;\n\n  /**\n   * @inheritDoc\n   */\n  public static id: string = 'Breadcrumbs';\n\n  /** JSDoc */\n  private readonly _options: BreadcrumbsOptions;\n\n  /**\n   * @inheritDoc\n   */\n  public constructor(options?: Partial<BreadcrumbsOptions>) {\n    this._options = {\n      console: true,\n      dom: true,\n      fetch: true,\n      history: true,\n      sentry: true,\n      xhr: true,\n      ...options,\n    };\n  }\n\n  /**\n   * Create a breadcrumb of `sentry` from the events themselves\n   */\n  public addSentryBreadcrumb(event: Event): void {\n    if (!this._options.sentry) {\n      return;\n    }\n    getCurrentHub().addBreadcrumb(\n      {\n        category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n        event_id: event.event_id,\n        level: event.level,\n        message: getEventDescription(event),\n      },\n      {\n        event,\n      },\n    );\n  }\n\n  /**\n   * Creates breadcrumbs from console API calls\n   */\n  private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n    const breadcrumb = {\n      category: 'console',\n      data: {\n        arguments: handlerData.args,\n        logger: 'console',\n      },\n      level: Severity.fromString(handlerData.level),\n      message: safeJoin(handlerData.args, ' '),\n    };\n\n    if (handlerData.level === 'assert') {\n      if (handlerData.args[0] === false) {\n        breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n        breadcrumb.data.arguments = handlerData.args.slice(1);\n      } else {\n        // Don't capture a breadcrumb for passed assertions\n        return;\n      }\n    }\n\n    getCurrentHub().addBreadcrumb(breadcrumb, {\n      input: handlerData.args,\n      level: handlerData.level,\n    });\n  }\n\n  /**\n   * Creates breadcrumbs from DOM API calls\n   */\n  private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n    let target;\n\n    // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n    try {\n      target = handlerData.event.target\n        ? htmlTreeAsString(handlerData.event.target as Node)\n        : htmlTreeAsString((handlerData.event as unknown) as Node);\n    } catch (e) {\n      target = '<unknown>';\n    }\n\n    if (target.length === 0) {\n      return;\n    }\n\n    getCurrentHub().addBreadcrumb(\n      {\n        category: `ui.${handlerData.name}`,\n        message: target,\n      },\n      {\n        event: handlerData.event,\n        name: handlerData.name,\n      },\n    );\n  }\n\n  /**\n   * Creates breadcrumbs from XHR API calls\n   */\n  private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n    if (handlerData.endTimestamp) {\n      // We only capture complete, non-sentry requests\n      if (handlerData.xhr.__sentry_own_request__) {\n        return;\n      }\n\n      getCurrentHub().addBreadcrumb(\n        {\n          category: 'xhr',\n          data: handlerData.xhr.__sentry_xhr__,\n          type: 'http',\n        },\n        {\n          xhr: handlerData.xhr,\n        },\n      );\n\n      return;\n    }\n  }\n\n  /**\n   * Creates breadcrumbs from fetch API calls\n   */\n  private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n    // We only capture complete fetch requests\n    if (!handlerData.endTimestamp) {\n      return;\n    }\n\n    if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n      // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n      return;\n    }\n\n    if (handlerData.error) {\n      getCurrentHub().addBreadcrumb(\n        {\n          category: 'fetch',\n          data: handlerData.fetchData,\n          level: Severity.Error,\n          type: 'http',\n        },\n        {\n          data: handlerData.error,\n          input: handlerData.args,\n        },\n      );\n    } else {\n      getCurrentHub().addBreadcrumb(\n        {\n          category: 'fetch',\n          data: {\n            ...handlerData.fetchData,\n            status_code: handlerData.response.status,\n          },\n          type: 'http',\n        },\n        {\n          input: handlerData.args,\n          response: handlerData.response,\n        },\n      );\n    }\n  }\n\n  /**\n   * Creates breadcrumbs from history API calls\n   */\n  private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n    const global = getGlobalObject<Window>();\n    let from = handlerData.from;\n    let to = handlerData.to;\n    const parsedLoc = parseUrl(global.location.href);\n    let parsedFrom = parseUrl(from);\n    const parsedTo = parseUrl(to);\n\n    // Initial pushState doesn't provide `from` information\n    if (!parsedFrom.path) {\n      parsedFrom = parsedLoc;\n    }\n\n    // Use only the path component of the URL if the URL matches the current\n    // document (almost all the time when using pushState)\n    if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n      // tslint:disable-next-line:no-parameter-reassignment\n      to = parsedTo.relative;\n    }\n    if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n      // tslint:disable-next-line:no-parameter-reassignment\n      from = parsedFrom.relative;\n    }\n\n    getCurrentHub().addBreadcrumb({\n      category: 'navigation',\n      data: {\n        from,\n        to,\n      },\n    });\n  }\n\n  /**\n   * Instrument browser built-ins w/ breadcrumb capturing\n   *  - Console API\n   *  - DOM API (click/typing)\n   *  - XMLHttpRequest API\n   *  - Fetch API\n   *  - History API\n   */\n  public setupOnce(): void {\n    if (this._options.console) {\n      addInstrumentationHandler({\n        callback: (...args) => {\n          this._consoleBreadcrumb(...args);\n        },\n        type: 'console',\n      });\n    }\n    if (this._options.dom) {\n      addInstrumentationHandler({\n        callback: (...args) => {\n          this._domBreadcrumb(...args);\n        },\n        type: 'dom',\n      });\n    }\n    if (this._options.xhr) {\n      addInstrumentationHandler({\n        callback: (...args) => {\n          this._xhrBreadcrumb(...args);\n        },\n        type: 'xhr',\n      });\n    }\n    if (this._options.fetch) {\n      addInstrumentationHandler({\n        callback: (...args) => {\n          this._fetchBreadcrumb(...args);\n        },\n        type: 'fetch',\n      });\n    }\n    if (this._options.history) {\n      addInstrumentationHandler({\n        callback: (...args) => {\n          this._historyBreadcrumb(...args);\n        },\n        type: 'history',\n      });\n    }\n  }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public readonly name: string = LinkedErrors.id;\n\n  /**\n   * @inheritDoc\n   */\n  public static id: string = 'LinkedErrors';\n\n  /**\n   * @inheritDoc\n   */\n  private readonly _key: string;\n\n  /**\n   * @inheritDoc\n   */\n  private readonly _limit: number;\n\n  /**\n   * @inheritDoc\n   */\n  public constructor(options: { key?: string; limit?: number } = {}) {\n    this._key = options.key || DEFAULT_KEY;\n    this._limit = options.limit || DEFAULT_LIMIT;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setupOnce(): void {\n    addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n      const self = getCurrentHub().getIntegration(LinkedErrors);\n      if (self) {\n        return self._handler(event, hint);\n      }\n      return event;\n    });\n  }\n\n  /**\n   * @inheritDoc\n   */\n  private _handler(event: Event, hint?: EventHint): Event | null {\n    if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n      return event;\n    }\n    const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n    event.exception.values = [...linkedErrors, ...event.exception.values];\n    return event;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n    if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n      return stack;\n    }\n    const stacktrace = computeStackTrace(error[key]);\n    const exception = exceptionFromStacktrace(stacktrace);\n    return this._walkErrorTree(error[key], key, [exception, ...stack]);\n  }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject<Window>();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public name: string = UserAgent.id;\n\n  /**\n   * @inheritDoc\n   */\n  public static id: string = 'UserAgent';\n\n  /**\n   * @inheritDoc\n   */\n  public setupOnce(): void {\n    addGlobalEventProcessor((event: Event) => {\n      if (getCurrentHub().getIntegration(UserAgent)) {\n        if (!global.navigator || !global.location) {\n          return event;\n        }\n\n        const request = event.request || {};\n        request.url = request.url || global.location.href;\n        request.headers = request.headers || {};\n        request.headers['User-Agent'] = global.navigator.userAgent;\n\n        return {\n          ...event,\n          request,\n        };\n      }\n      return event;\n    });\n  }\n}\n","export const SDK_NAME = 'sentry.javascript.browser';\nexport const SDK_VERSION = '5.17.0';\n","import { API, BaseClient, Scope } from '@sentry/core';\nimport { DsnLike, Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { Breadcrumbs } from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n  [key: string]: any;\n  eventId?: string;\n  dsn?: DsnLike;\n  user?: {\n    email?: string;\n    name?: string;\n  };\n  lang?: string;\n  title?: string;\n  subtitle?: string;\n  subtitle2?: string;\n  labelName?: string;\n  labelEmail?: string;\n  labelComments?: string;\n  labelClose?: string;\n  labelSubmit?: string;\n  errorGeneric?: string;\n  errorFormEntry?: string;\n  successMessage?: string;\n  /** Callback after reportDialog showed up */\n  onLoad?(): void;\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient<BrowserBackend, BrowserOptions> {\n  /**\n   * Creates a new Browser SDK instance.\n   *\n   * @param options Configuration options for this SDK.\n   */\n  public constructor(options: BrowserOptions = {}) {\n    super(BrowserBackend, options);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike<Event | null> {\n    event.platform = event.platform || 'javascript';\n    event.sdk = {\n      ...event.sdk,\n      name: SDK_NAME,\n      packages: [\n        ...((event.sdk && event.sdk.packages) || []),\n        {\n          name: 'npm:@sentry/browser',\n          version: SDK_VERSION,\n        },\n      ],\n      version: SDK_VERSION,\n    };\n\n    return super._prepareEvent(event, scope, hint);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  protected _sendEvent(event: Event): void {\n    const integration = this.getIntegration(Breadcrumbs);\n    if (integration) {\n      integration.addSentryBreadcrumb(event);\n    }\n    super._sendEvent(event);\n  }\n\n  /**\n   * Show a report dialog to the user to send feedback to a specific event.\n   *\n   * @param options Set individual options for the dialog\n   */\n  public showReportDialog(options: ReportDialogOptions = {}): void {\n    // doesn't work without a document (React Native)\n    const document = getGlobalObject<Window>().document;\n    if (!document) {\n      return;\n    }\n\n    if (!this._isEnabled()) {\n      logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n      return;\n    }\n\n    const dsn = options.dsn || this.getDsn();\n\n    if (!options.eventId) {\n      logger.error('Missing `eventId` option in showReportDialog call');\n      return;\n    }\n\n    if (!dsn) {\n      logger.error('Missing `Dsn` option in showReportDialog call');\n      return;\n    }\n\n    const script = document.createElement('script');\n    script.async = true;\n    script.src = new API(dsn).getReportDialogEndpoint(options);\n\n    if (options.onLoad) {\n      script.onload = options.onLoad;\n    }\n\n    (document.head || document.body).appendChild(script);\n  }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient, ReportDialogOptions } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n  new CoreIntegrations.InboundFilters(),\n  new CoreIntegrations.FunctionToString(),\n  new TryCatch(),\n  new Breadcrumbs(),\n  new GlobalHandlers(),\n  new LinkedErrors(),\n  new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n *   dsn: '__DSN__',\n *   // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n *   scope.setExtra({ battery: 0.7 });\n *   scope.setTag({ user_mode: 'admin' });\n *   scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n *   message: 'My Breadcrumb',\n *   // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n *   message: 'Manual',\n *   stacktrace: [\n *     // ...\n *   ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n  if (options.defaultIntegrations === undefined) {\n    options.defaultIntegrations = defaultIntegrations;\n  }\n  if (options.release === undefined) {\n    const window = getGlobalObject<Window>();\n    // This supports the variable that sentry-webpack-plugin injects\n    if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n      options.release = window.SENTRY_RELEASE.id;\n    }\n  }\n  initAndBind(BrowserClient, options);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n  if (!options.eventId) {\n    options.eventId = getCurrentHub().lastEventId();\n  }\n  const client = getCurrentHub().getClient<BrowserClient>();\n  if (client) {\n    client.showReportDialog(options);\n  }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n  return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n  // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n  callback();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout?: number): PromiseLike<boolean> {\n  const client = getCurrentHub().getClient<BrowserClient>();\n  if (client) {\n    return client.flush(timeout);\n  }\n  return SyncPromise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout?: number): PromiseLike<boolean> {\n  const client = getCurrentHub().getClient<BrowserClient>();\n  if (client) {\n    return client.close(timeout);\n  }\n  return SyncPromise.reject(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn: Function): any {\n  return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n","export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject<Window>();\nif (_window.Sentry && _window.Sentry.Integrations) {\n  windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n  ...windowIntegrations,\n  ...CoreIntegrations,\n  ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n"],"names":["Severity","Status","global","CoreIntegrations.InboundFilters","CoreIntegrations.FunctionToString","wrap","internalWrap"],"mappings":";EAAA;AACA,EAAA,IAAY,QASX;EATD,WAAY,QAAQ;;MAElB,uCAAQ,CAAA;;MAER,yCAAS,CAAA;;MAET,yCAAS,CAAA;;MAET,6CAAW,CAAA;EACb,CAAC,EATW,QAAQ,KAAR,QAAQ,QASnB;;ECVD;AACA,EAAA,WAAY,QAAQ;;MAElB,2BAAe,CAAA;;MAEf,2BAAe,CAAA;;MAEf,+BAAmB,CAAA;;MAEnB,uBAAW,CAAA;;MAEX,yBAAa,CAAA;;MAEb,2BAAe,CAAA;;MAEf,iCAAqB,CAAA;EACvB,CAAC,EAfWA,gBAAQ,KAARA,gBAAQ,QAenB;EACD;EACA;EACA,WAAiB,QAAQ;;;;;;;MAOvB,SAAgB,UAAU,CAAC,KAAa;UACtC,QAAQ,KAAK;cACX,KAAK,OAAO;kBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;cACxB,KAAK,MAAM;kBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;cACvB,KAAK,MAAM,CAAC;cACZ,KAAK,SAAS;kBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;cAC1B,KAAK,OAAO;kBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;cACxB,KAAK,OAAO;kBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;cACxB,KAAK,UAAU;kBACb,OAAO,QAAQ,CAAC,QAAQ,CAAC;cAC3B,KAAK,KAAK,CAAC;cACX;kBACE,OAAO,QAAQ,CAAC,GAAG,CAAC;WACvB;OACF;MAnBe,mBAAU,aAmBzB,CAAA;EACH,CAAC,EA3BgBA,gBAAQ,KAARA,gBAAQ,QA2BxB;;EC9CD;AACA,E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