{"version":3,"sources":["jsdelivr-header.js","/npm/@bugsnag/node_modules/browser-pack-flat/_prelude","/npm/@bugsnag/node@8.6.0/core/breadcrumb.js","/npm/@bugsnag/node@8.6.0/core/lib/breadcrumb-types.js","/npm/@bugsnag/node@8.6.0/core/lib/es-utils/reduce.js","/npm/@bugsnag/node@8.6.0/core/lib/es-utils/filter.js","/npm/@bugsnag/node@8.6.0/core/lib/es-utils/includes.js","/npm/@bugsnag/node@8.6.0/core/lib/es-utils/is-array.js","/npm/@bugsnag/node@8.6.0/core/lib/es-utils/keys.js","/npm/@bugsnag/node@8.6.0/core/lib/validators/int-range.js","/npm/@bugsnag/node@8.6.0/core/lib/validators/list-of-functions.js","/npm/@bugsnag/node@8.6.0/core/lib/validators/string-with-length.js","/npm/@bugsnag/node@8.6.0/core/config.js","/npm/@bugsnag/node@8.6.0/core/lib/error-stack-parser.js","/npm/@bugsnag/node@8.6.0/core/lib/es-utils/assign.js","/npm/@bugsnag/node@8.6.0/core/lib/es-utils/map.js","/npm/@bugsnag/node_modules/@bugsnag/safe-json-stringify/index.js","/npm/@bugsnag/node@8.6.0/core/lib/feature-flag-delegate.js","/npm/@bugsnag/node@8.6.0/core/lib/has-stack.js","/npm/@bugsnag/node@8.6.0/core/lib/iserror.js","/npm/@bugsnag/node@8.6.0/core/lib/metadata-delegate.js","/npm/@bugsnag/node@8.6.0/core/event.js","/npm/@bugsnag/node@8.6.0/core/lib/sync-callback-runner.js","/npm/@bugsnag/node_modules/@bugsnag/cuid/lib/pad.js","/npm/@bugsnag/node_modules/@bugsnag/cuid/lib/fingerprint.js","/npm/@bugsnag/node_modules/@bugsnag/cuid/index.js","/npm/@bugsnag/node_modules/@bugsnag/cuid/lib/is-cuid.js","/npm/@bugsnag/node@8.6.0/core/session.js","/npm/@bugsnag/node@8.6.0/core/client.js","/npm/@bugsnag/node@8.6.0/core/lib/callback-runner.js","/npm/@bugsnag/node@8.6.0/core/lib/async-every.js","/npm/@bugsnag/node@8.6.0/core/lib/json-payload.js","/npm/@bugsnag/node@8.6.0/delivery-node/request.js","/npm/@bugsnag/node@8.6.0/delivery-node/delivery.js","/npm/@bugsnag/node@8.6.0/dist/src/config.js","/npm/@bugsnag/node@8.6.0/plugin-app-duration/app.js","/npm/@bugsnag/node@8.6.0/plugin-console-breadcrumbs/console-breadcrumbs.js","/npm/@bugsnag/node@8.6.0/core/lib/clone-client.js","/npm/@bugsnag/node@8.6.0/core/lib/node-fallback-stack.js","/npm/@bugsnag/node@8.6.0/plugin-contextualize/contextualize.js","/npm/@bugsnag/node@8.6.0/plugin-intercept/intercept.js","/npm/@bugsnag/node@8.6.0/plugin-node-device/device.js","/npm/@bugsnag/node@8.6.0/core/lib/path-normalizer.js","/npm/@bugsnag/node@8.6.0/plugin-node-in-project/in-project.js","/npm/@bugsnag/node@8.6.0/plugin-node-surrounding-code/surrounding-code.js","/npm/@bugsnag/node@8.6.0/plugin-node-uncaught-exception/uncaught-exception.js","/npm/@bugsnag/node@8.6.0/plugin-node-unhandled-rejection/unhandled-rejection.js","/npm/@bugsnag/node_modules/backo/index.js","/npm/@bugsnag/node@8.6.0/plugin-server-session/tracker.js","/npm/@bugsnag/node@8.6.0/plugin-server-session/session.js","/npm/@bugsnag/node@8.6.0/plugin-strip-project-root/strip-project-root.js","/npm/@bugsnag/node@8.6.0/dist/src/notifier.js","/npm/@bugsnag/node@8.6.0/plugin-stackframe-path-normaliser/path-normaliser.js","/npm/@bugsnag/node_modules/browser-pack-flat/_postlude"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCNA,SAAA,GAAA,oBAAA,SAAA,oBAAA,cAAA,QAAA,SAAA,sBAAA,eAAA,IAAA,OAAA,GAAA,OAAA,sBAAA,cAAA,oBAAA,cAAA,oBAAA,UAAA,MAAA,QAAA,GAAA,mBCkBA,EAlBgB,WACd,SAAA,EAAa,EAAS,EAAU,EAAM,QAAS,IAAT,MAAY,IAAI,MACpD,KAAK,KAAO,EACZ,KAAK,QAAU,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sDelivr using Terser v5.39.0.\n * Original file: /npm/@bugsnag/node@8.6.0/dist/bugsnag.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.bugsnag = f()}})(function(){var define,module,exports;\n","class Breadcrumb {\n  constructor (message, metadata, type, timestamp = new Date()) {\n    this.type = type\n    this.message = message\n    this.metadata = metadata\n    this.timestamp = timestamp\n  }\n\n  toJSON () {\n    return {\n      type: this.type,\n      name: this.message,\n      timestamp: this.timestamp,\n      metaData: this.metadata\n    }\n  }\n}\n\nmodule.exports = Breadcrumb\n","module.exports = ['navigation', 'request', 'process', 'log', 'user', 'state', 'error', 'manual']\n","// Array#reduce\nmodule.exports = (arr, fn, accum) => {\n  let val = accum\n  for (let i = 0, len = arr.length; i < len; i++) val = fn(val, arr[i], i, arr)\n  return val\n}\n","const reduce = require('./reduce')\n\n// Array#filter\nmodule.exports = (arr, fn) =>\n  reduce(arr, (accum, item, i, arr) => !fn(item, i, arr) ? accum : accum.concat(item), [])\n","const reduce = require('./reduce')\n// Array#includes\nmodule.exports = (arr, x) =>\n  reduce(arr, (accum, item, i, arr) => accum === true || item === x, false)\n","// Array#isArray\nmodule.exports = obj => Object.prototype.toString.call(obj) === '[object Array]'\n","/* eslint-disable-next-line no-prototype-builtins */\nconst _hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString')\nconst _dontEnums = [\n  'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty',\n  'isPrototypeOf', 'propertyIsEnumerable', 'constructor'\n]\n\n// Object#keys\nmodule.exports = obj => {\n  // stripped down version of\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/Keys\n  const result = []\n  let prop\n  for (prop in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, prop)) result.push(prop)\n  }\n  if (!_hasDontEnumBug) return result\n  for (let i = 0, len = _dontEnums.length; i < len; i++) {\n    if (Object.prototype.hasOwnProperty.call(obj, _dontEnums[i])) result.push(_dontEnums[i])\n  }\n  return result\n}\n","module.exports = (min = 1, max = Infinity) => value =>\n  typeof value === 'number' &&\n  parseInt('' + value, 10) === value &&\n  value >= min && value <= max\n","const filter = require('../es-utils/filter')\nconst isArray = require('../es-utils/is-array')\n\nmodule.exports = value => typeof value === 'function' || (isArray(value) && filter(value, f => typeof f === 'function').length === value.length)\n","module.exports = value => typeof value === 'string' && !!value.length\n","const filter = require('./lib/es-utils/filter')\nconst reduce = require('./lib/es-utils/reduce')\nconst keys = require('./lib/es-utils/keys')\nconst isArray = require('./lib/es-utils/is-array')\nconst includes = require('./lib/es-utils/includes')\nconst intRange = require('./lib/validators/int-range')\nconst stringWithLength = require('./lib/validators/string-with-length')\nconst listOfFunctions = require('./lib/validators/list-of-functions')\n\nconst BREADCRUMB_TYPES = require('./lib/breadcrumb-types')\nconst defaultErrorTypes = () => ({ unhandledExceptions: true, unhandledRejections: true })\n\nmodule.exports.schema = {\n  apiKey: {\n    defaultValue: () => null,\n    message: 'is required',\n    validate: stringWithLength\n  },\n  appVersion: {\n    defaultValue: () => undefined,\n    message: 'should be a string',\n    validate: value => value === undefined || stringWithLength(value)\n  },\n  appType: {\n    defaultValue: () => undefined,\n    message: 'should be a string',\n    validate: value => value === undefined || stringWithLength(value)\n  },\n  autoDetectErrors: {\n    defaultValue: () => true,\n    message: 'should be true|false',\n    validate: value => value === true || value === false\n  },\n  enabledErrorTypes: {\n    defaultValue: () => defaultErrorTypes(),\n    message: 'should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }',\n    allowPartialObject: true,\n    validate: value => {\n      // ensure we have an object\n      if (typeof value !== 'object' || !value) return false\n      const providedKeys = keys(value)\n      const defaultKeys = keys(defaultErrorTypes())\n      // ensure it only has a subset of the allowed keys\n      if (filter(providedKeys, k => includes(defaultKeys, k)).length < providedKeys.length) return false\n      // ensure all of the values are boolean\n      if (filter(keys(value), k => typeof value[k] !== 'boolean').length > 0) return false\n      return true\n    }\n  },\n  onError: {\n    defaultValue: () => [],\n    message: 'should be a function or array of functions',\n    validate: listOfFunctions\n  },\n  onSession: {\n    defaultValue: () => [],\n    message: 'should be a function or array of functions',\n    validate: listOfFunctions\n  },\n  onBreadcrumb: {\n    defaultValue: () => [],\n    message: 'should be a function or array of functions',\n    validate: listOfFunctions\n  },\n  endpoints: {\n    defaultValue: (endpoints) => {\n      // only apply the default value if no endpoints have been provided, otherwise prevent delivery by setting to null\n      if (typeof endpoints === 'undefined') {\n        return ({\n          notify: 'https://notify.bugsnag.com',\n          sessions: 'https://sessions.bugsnag.com'\n        })\n      } else {\n        return ({ notify: null, sessions: null })\n      }\n    },\n    message: 'should be an object containing endpoint URLs { notify, sessions }',\n    validate: (val) =>\n      // first, ensure it's an object\n      (val && typeof val === 'object') &&\n      (\n        // notify and sessions must always be set\n        stringWithLength(val.notify) && stringWithLength(val.sessions)\n      ) &&\n      // ensure no keys other than notify/session are set on endpoints object\n      filter(keys(val), k => !includes(['notify', 'sessions'], k)).length === 0\n  },\n  autoTrackSessions: {\n    defaultValue: val => true,\n    message: 'should be true|false',\n    validate: val => val === true || val === false\n  },\n  enabledReleaseStages: {\n    defaultValue: () => null,\n    message: 'should be an array of strings',\n    validate: value => value === null || (isArray(value) && filter(value, f => typeof f === 'string').length === value.length)\n  },\n  releaseStage: {\n    defaultValue: () => 'production',\n    message: 'should be a string',\n    validate: value => typeof value === 'string' && value.length\n  },\n  maxBreadcrumbs: {\n    defaultValue: () => 25,\n    message: 'should be a number ≤100',\n    validate: value => intRange(0, 100)(value)\n  },\n  enabledBreadcrumbTypes: {\n    defaultValue: () => BREADCRUMB_TYPES,\n    message: `should be null or a list of available breadcrumb types (${BREADCRUMB_TYPES.join(',')})`,\n    validate: value => value === null || (isArray(value) && reduce(value, (accum, maybeType) => {\n      if (accum === false) return accum\n      return includes(BREADCRUMB_TYPES, maybeType)\n    }, true))\n  },\n  context: {\n    defaultValue: () => undefined,\n    message: 'should be a string',\n    validate: value => value === undefined || typeof value === 'string'\n  },\n  user: {\n    defaultValue: () => ({}),\n    message: 'should be an object with { id, email, name } properties',\n    validate: value =>\n      (value === null) ||\n      (value && reduce(\n        keys(value),\n        (accum, key) => accum && includes(['id', 'email', 'name'], key),\n        true\n      ))\n  },\n  metadata: {\n    defaultValue: () => ({}),\n    message: 'should be an object',\n    validate: (value) => typeof value === 'object' && value !== null\n  },\n  logger: {\n    defaultValue: () => undefined,\n    message: 'should be null or an object with methods { debug, info, warn, error }',\n    validate: value =>\n      (!value) ||\n      (value && reduce(\n        ['debug', 'info', 'warn', 'error'],\n        (accum, method) => accum && typeof value[method] === 'function',\n        true\n      ))\n  },\n  redactedKeys: {\n    defaultValue: () => ['password'],\n    message: 'should be an array of strings|regexes',\n    validate: value =>\n      isArray(value) && value.length === filter(value, s =>\n        (typeof s === 'string' || (s && typeof s.test === 'function'))\n      ).length\n  },\n  plugins: {\n    defaultValue: () => ([]),\n    message: 'should be an array of plugin objects',\n    validate: value =>\n      isArray(value) && value.length === filter(value, p =>\n        (p && typeof p === 'object' && typeof p.load === 'function')\n      ).length\n  },\n  featureFlags: {\n    defaultValue: () => [],\n    message: 'should be an array of objects that have a \"name\" property',\n    validate: value =>\n      isArray(value) && value.length === filter(value, feature =>\n        feature && typeof feature === 'object' && typeof feature.name === 'string'\n      ).length\n  },\n  reportUnhandledPromiseRejectionsAsHandled: {\n    defaultValue: () => false,\n    message: 'should be true|false',\n    validate: value => value === true || value === false\n  },\n  sendPayloadChecksums: {\n    defaultValue: () => false,\n    message: 'should be true|false',\n    validate: value => value === true || value === false\n  }\n}\n","module.exports = require('error-stack-parser')\n","// extends helper from babel\n// https://github.com/babel/babel/blob/916429b516e6466fd06588ee820e40e025d7f3a3/packages/babel-helpers/src/helpers.js#L377-L393\nmodule.exports = function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i]\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key]\n      }\n    }\n  }\n  return target\n}\n","const reduce = require('./reduce')\n\n// Array#map\nmodule.exports = (arr, fn) =>\n  reduce(arr, (accum, item, i, arr) => accum.concat(fn(item, i, arr)), [])\n","module.exports = function (data, replacer, space, opts) {\n  var redactedKeys = opts && opts.redactedKeys ? opts.redactedKeys : []\n  var redactedPaths = opts && opts.redactedPaths ? opts.redactedPaths : []\n  return JSON.stringify(\n    prepareObjForSerialization(data, redactedKeys, redactedPaths),\n    replacer,\n    space\n  )\n}\n\nvar MAX_DEPTH = 20\nvar MAX_EDGES = 25000\nvar MIN_PRESERVED_DEPTH = 8\n\nvar REPLACEMENT_NODE = '...'\n\nfunction isError (o) {\n  return o instanceof Error ||\n    /^\\[object (Error|(Dom)?Exception)\\]$/.test(Object.prototype.toString.call(o))\n}\n\nfunction throwsMessage (err) {\n  return '[Throws: ' + (err ? err.message : '?') + ']'\n}\n\nfunction find (haystack, needle) {\n  for (var i = 0, len = haystack.length; i < len; i++) {\n    if (haystack[i] === needle) return true\n  }\n  return false\n}\n\n// returns true if the string `path` starts with any of the provided `paths`\nfunction isDescendent (paths, path) {\n  for (var i = 0, len = paths.length; i < len; i++) {\n    if (path.indexOf(paths[i]) === 0) return true\n  }\n  return false\n}\n\nfunction shouldRedact (patterns, key) {\n  for (var i = 0, len = patterns.length; i < len; i++) {\n    if (typeof patterns[i] === 'string' && patterns[i].toLowerCase() === key.toLowerCase()) return true\n    if (patterns[i] && typeof patterns[i].test === 'function' && patterns[i].test(key)) return true\n  }\n  return false\n}\n\nfunction isArray (obj) {\n  return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\nfunction safelyGetProp (obj, prop) {\n  try {\n    return obj[prop]\n  } catch (err) {\n    return throwsMessage(err)\n  }\n}\n\nfunction prepareObjForSerialization (obj, redactedKeys, redactedPaths) {\n  var seen = [] // store references to objects we have seen before\n  var edges = 0\n\n  function visit (obj, path) {\n    function edgesExceeded () {\n      return path.length > MIN_PRESERVED_DEPTH && edges > MAX_EDGES\n    }\n\n    edges++\n\n    if (path.length > MAX_DEPTH) return REPLACEMENT_NODE\n    if (edgesExceeded()) return REPLACEMENT_NODE\n    if (obj === null || typeof obj !== 'object') return obj\n    if (find(seen, obj)) return '[Circular]'\n\n    seen.push(obj)\n\n    if (typeof obj.toJSON === 'function') {\n      try {\n        // we're not going to count this as an edge because it\n        // replaces the value of the currently visited object\n        edges--\n        var fResult = visit(obj.toJSON(), path)\n        seen.pop()\n        return fResult\n      } catch (err) {\n        return throwsMessage(err)\n      }\n    }\n\n    var er = isError(obj)\n    if (er) {\n      edges--\n      var eResult = visit({ name: obj.name, message: obj.message }, path)\n      seen.pop()\n      return eResult\n    }\n\n    if (isArray(obj)) {\n      var aResult = []\n      for (var i = 0, len = obj.length; i < len; i++) {\n        if (edgesExceeded()) {\n          aResult.push(REPLACEMENT_NODE)\n          break\n        }\n        aResult.push(visit(obj[i], path.concat('[]')))\n      }\n      seen.pop()\n      return aResult\n    }\n\n    var result = {}\n    try {\n      for (var prop in obj) {\n        if (!Object.prototype.hasOwnProperty.call(obj, prop)) continue\n        if (isDescendent(redactedPaths, path.join('.')) && shouldRedact(redactedKeys, prop)) {\n          result[prop] = '[REDACTED]'\n          continue\n        }\n        if (edgesExceeded()) {\n          result[prop] = REPLACEMENT_NODE\n          break\n        }\n        result[prop] = visit(safelyGetProp(obj, prop), path.concat(prop))\n      }\n    } catch (e) {}\n    seen.pop()\n    return result\n  }\n\n  return visit(obj, [])\n}\n","const map = require('./es-utils/map')\nconst filter = require('./es-utils/filter')\nconst isArray = require('./es-utils/is-array')\nconst jsonStringify = require('@bugsnag/safe-json-stringify')\n\nfunction add (existingFeatures, existingFeatureKeys, name, variant) {\n  if (typeof name !== 'string') {\n    return\n  }\n\n  if (variant === undefined) {\n    variant = null\n  } else if (variant !== null && typeof variant !== 'string') {\n    variant = jsonStringify(variant)\n  }\n\n  const existingIndex = existingFeatureKeys[name]\n  if (typeof existingIndex === 'number') {\n    existingFeatures[existingIndex] = { name, variant }\n    return\n  }\n\n  existingFeatures.push({ name, variant })\n  existingFeatureKeys[name] = existingFeatures.length - 1\n}\n\nfunction merge (existingFeatures, newFeatures, existingFeatureKeys) {\n  if (!isArray(newFeatures)) {\n    return\n  }\n\n  for (let i = 0; i < newFeatures.length; ++i) {\n    const feature = newFeatures[i]\n\n    if (feature === null || typeof feature !== 'object') {\n      continue\n    }\n\n    // 'add' will handle if 'name' doesn't exist & 'variant' is optional\n    add(existingFeatures, existingFeatureKeys, feature.name, feature.variant)\n  }\n\n  return existingFeatures\n}\n\n// convert feature flags from a map of 'name -> variant' into the format required\n// by the Bugsnag Event API:\n//   [{ featureFlag: 'name', variant: 'variant' }, { featureFlag: 'name 2' }]\nfunction toEventApi (featureFlags) {\n  return map(\n    filter(featureFlags, Boolean),\n    ({ name, variant }) => {\n      const flag = { featureFlag: name }\n\n      // don't add a 'variant' property unless there's actually a value\n      if (typeof variant === 'string') {\n        flag.variant = variant\n      }\n\n      return flag\n    }\n  )\n}\n\nfunction clear (features, featuresIndex, name) {\n  const existingIndex = featuresIndex[name]\n  if (typeof existingIndex === 'number') {\n    features[existingIndex] = null\n    delete featuresIndex[name]\n  }\n}\n\nmodule.exports = { add, clear, merge, toEventApi }\n","// Given `err` which may be an error, does it have a stack property which is a string?\nmodule.exports = err =>\n  !!err &&\n  (!!err.stack || !!err.stacktrace || !!err['opera#sourceloc']) &&\n  typeof (err.stack || err.stacktrace || err['opera#sourceloc']) === 'string' &&\n  err.stack !== `${err.name}: ${err.message}`\n","module.exports = require('iserror')\n","const assign = require('./es-utils/assign')\n\nconst add = (state, section, keyOrObj, maybeVal) => {\n  if (!section) return\n  let updates\n\n  // addMetadata(\"section\", null) -> clears section\n  if (keyOrObj === null) return clear(state, section)\n\n  // normalise the two supported input types into object form\n  if (typeof keyOrObj === 'object') updates = keyOrObj\n  if (typeof keyOrObj === 'string') updates = { [keyOrObj]: maybeVal }\n\n  // exit if we don't have an updates object at this point\n  if (!updates) return\n\n  // preventing the __proto__ property from being used as a key\n  if (section === '__proto__' || section === 'constructor' || section === 'prototype') {\n    return\n  }\n\n  // ensure a section with this name exists\n  if (!state[section]) state[section] = {}\n\n  // merge the updates with the existing section\n  state[section] = assign({}, state[section], updates)\n}\n\nconst get = (state, section, key) => {\n  if (typeof section !== 'string') return undefined\n  if (!key) {\n    return state[section]\n  }\n  if (state[section]) {\n    return state[section][key]\n  }\n  return undefined\n}\n\nconst clear = (state, section, key) => {\n  if (typeof section !== 'string') return\n\n  // clear an entire section\n  if (!key) {\n    delete state[section]\n    return\n  }\n\n  // preventing the __proto__ property from being used as a key\n  if (section === '__proto__' || section === 'constructor' || section === 'prototype') {\n    return\n  }\n\n  // clear a single value from a section\n  if (state[section]) {\n    delete state[section][key]\n  }\n}\n\nmodule.exports = { add, get, clear }\n","const ErrorStackParser = require('./lib/error-stack-parser')\nconst StackGenerator = require('stack-generator')\nconst hasStack = require('./lib/has-stack')\nconst map = require('./lib/es-utils/map')\nconst reduce = require('./lib/es-utils/reduce')\nconst filter = require('./lib/es-utils/filter')\nconst assign = require('./lib/es-utils/assign')\nconst metadataDelegate = require('./lib/metadata-delegate')\nconst featureFlagDelegate = require('./lib/feature-flag-delegate')\nconst isError = require('./lib/iserror')\n\nclass Event {\n  constructor (errorClass, errorMessage, stacktrace = [], handledState = defaultHandledState(), originalError) {\n    this.apiKey = undefined\n    this.context = undefined\n    this.groupingHash = undefined\n    this.originalError = originalError\n\n    this._handledState = handledState\n    this.severity = this._handledState.severity\n    this.unhandled = this._handledState.unhandled\n\n    this.app = {}\n    this.device = {}\n    this.request = {}\n\n    this.breadcrumbs = []\n    this.threads = []\n\n    this._metadata = {}\n    this._features = []\n    this._featuresIndex = {}\n    this._user = {}\n    this._session = undefined\n    this._correlation = undefined\n    this._groupingDiscriminator = undefined\n\n    this.errors = [\n      createBugsnagError(errorClass, errorMessage, Event.__type, stacktrace)\n    ]\n\n    // Flags.\n    // Note these are not initialised unless they are used\n    // to save unnecessary bytes in the browser bundle\n\n    /* this.attemptImmediateDelivery, default: true */\n  }\n\n  addMetadata (section, keyOrObj, maybeVal) {\n    return metadataDelegate.add(this._metadata, section, keyOrObj, maybeVal)\n  }\n\n  /**\n     * Associate this event with a specific trace. This is usually done automatically when\n     * using bugsnag-js-performance, but can also be set manually if required.\n     *\n     * @param traceId the ID of the trace the event occurred within\n     * @param spanId the ID of the span that the event occurred within\n     */\n  setTraceCorrelation (traceId, spanId) {\n    if (typeof traceId === 'string') {\n      this._correlation = { traceId, ...typeof spanId === 'string' ? { spanId } : { } }\n    }\n  }\n\n  getGroupingDiscriminator () {\n    return this._groupingDiscriminator\n  }\n\n  setGroupingDiscriminator (value) {\n    const previousValue = this._groupingDiscriminator\n    if (typeof value === 'string' || value === null || value === undefined) this._groupingDiscriminator = value\n    return previousValue\n  }\n\n  getMetadata (section, key) {\n    return metadataDelegate.get(this._metadata, section, key)\n  }\n\n  clearMetadata (section, key) {\n    return metadataDelegate.clear(this._metadata, section, key)\n  }\n\n  addFeatureFlag (name, variant = null) {\n    featureFlagDelegate.add(this._features, this._featuresIndex, name, variant)\n  }\n\n  addFeatureFlags (featureFlags) {\n    featureFlagDelegate.merge(this._features, featureFlags, this._featuresIndex)\n  }\n\n  getFeatureFlags () {\n    return featureFlagDelegate.toEventApi(this._features)\n  }\n\n  clearFeatureFlag (name) {\n    featureFlagDelegate.clear(this._features, this._featuresIndex, name)\n  }\n\n  clearFeatureFlags () {\n    this._features = []\n    this._featuresIndex = {}\n  }\n\n  getUser () {\n    return this._user\n  }\n\n  setUser (id, email, name) {\n    this._user = { id, email, name }\n  }\n\n  toJSON () {\n    return {\n      payloadVersion: '4',\n      exceptions: map(this.errors, er => assign({}, er, { message: er.errorMessage })),\n      severity: this.severity,\n      unhandled: this._handledState.unhandled,\n      severityReason: this._handledState.severityReason,\n      app: this.app,\n      device: this.device,\n      request: this.request,\n      breadcrumbs: this.breadcrumbs,\n      context: this.context,\n      groupingHash: this.groupingHash,\n      groupingDiscriminator: this._groupingDiscriminator,\n      metaData: this._metadata,\n      user: this._user,\n      session: this._session,\n      featureFlags: this.getFeatureFlags(),\n      correlation: this._correlation\n    }\n  }\n}\n\n// takes a stacktrace.js style stackframe (https://github.com/stacktracejs/stackframe)\n// and returns a Bugsnag compatible stackframe (https://docs.bugsnag.com/api/error-reporting/#json-payload)\nconst formatStackframe = frame => {\n  const f = {\n    file: frame.fileName,\n    method: normaliseFunctionName(frame.functionName),\n    lineNumber: frame.lineNumber,\n    columnNumber: frame.columnNumber,\n    code: undefined,\n    inProject: undefined\n  }\n  // Some instances result in no file:\n  // - calling notify() from chrome's terminal results in no file/method.\n  // - non-error exception thrown from global code in FF\n  // This adds one.\n  if (f.lineNumber > -1 && !f.file && !f.method) {\n    f.file = 'global code'\n  }\n  return f\n}\n\nconst normaliseFunctionName = name => /^global code$/i.test(name) ? 'global code' : name\n\nconst defaultHandledState = () => ({\n  unhandled: false,\n  severity: 'warning',\n  severityReason: { type: 'handledException' }\n})\n\nconst ensureString = (str) => typeof str === 'string' ? str : ''\n\nfunction createBugsnagError (errorClass, errorMessage, type, stacktrace) {\n  return {\n    errorClass: ensureString(errorClass),\n    errorMessage: ensureString(errorMessage),\n    type,\n    stacktrace: reduce(stacktrace, (accum, frame) => {\n      const f = formatStackframe(frame)\n      // don't include a stackframe if none of its properties are defined\n      try {\n        if (JSON.stringify(f) === '{}') return accum\n        return accum.concat(f)\n      } catch (e) {\n        return accum\n      }\n    }, [])\n  }\n}\n\nfunction getCauseStack (error) {\n  if (error.cause) {\n    return [error, ...getCauseStack(error.cause)]\n  } else {\n    return [error]\n  }\n}\n\n// Helpers\n\nEvent.getStacktrace = function (error, errorFramesToSkip, backtraceFramesToSkip) {\n  if (hasStack(error)) return ErrorStackParser.parse(error).slice(errorFramesToSkip)\n  // error wasn't provided or didn't have a stacktrace so try to walk the callstack\n  try {\n    return filter(StackGenerator.backtrace(), frame =>\n      (frame.functionName || '').indexOf('StackGenerator$$') === -1\n    ).slice(1 + backtraceFramesToSkip)\n  } catch (e) {\n    return []\n  }\n}\n\nEvent.create = function (maybeError, tolerateNonErrors, handledState, component, errorFramesToSkip = 0, logger) {\n  const [error, internalFrames] = normaliseError(maybeError, tolerateNonErrors, component, logger)\n  let event\n  try {\n    const stacktrace = Event.getStacktrace(\n      error,\n      // if an error was created/throw in the normaliseError() function, we need to\n      // tell the getStacktrace() function to skip the number of frames we know will\n      // be from our own functions. This is added to the number of frames deep we\n      // were told about\n      internalFrames > 0 ? 1 + internalFrames + errorFramesToSkip : 0,\n      // if there's no stacktrace, the callstack may be walked to generated one.\n      // this is how many frames should be removed because they come from our library\n      1 + errorFramesToSkip\n    )\n    event = new Event(error.name, error.message, stacktrace, handledState, maybeError)\n  } catch (e) {\n    event = new Event(error.name, error.message, [], handledState, maybeError)\n  }\n  if (error.name === 'InvalidError') {\n    event.addMetadata(`${component}`, 'non-error parameter', makeSerialisable(maybeError))\n  }\n  if (error.cause) {\n    const causes = getCauseStack(error).slice(1)\n    const normalisedCauses = map(causes, (cause) => {\n      // Only get stacktrace for error causes that are a valid JS Error and already have a stack\n      const stacktrace = (isError(cause) && hasStack(cause)) ? ErrorStackParser.parse(cause) : []\n      const [error] = normaliseError(cause, true, 'error cause')\n      if (error.name === 'InvalidError') event.addMetadata('error cause', makeSerialisable(cause))\n      return createBugsnagError(error.name, error.message, Event.__type, stacktrace)\n    })\n\n    event.errors.push(...normalisedCauses)\n  }\n\n  return event\n}\n\nconst makeSerialisable = (err) => {\n  if (err === null) return 'null'\n  if (err === undefined) return 'undefined'\n  return err\n}\n\nconst normaliseError = (maybeError, tolerateNonErrors, component, logger) => {\n  let error\n  let internalFrames = 0\n\n  const createAndLogInputError = (reason) => {\n    const verb = (component === 'error cause' ? 'was' : 'received')\n    if (logger) logger.warn(`${component} ${verb} a non-error: \"${reason}\"`)\n    const err = new Error(`${component} ${verb} a non-error. See \"${component}\" tab for more detail.`)\n    err.name = 'InvalidError'\n    return err\n  }\n\n  // In some cases:\n  //\n  //  - the promise rejection handler (both in the browser and node)\n  //  - the node uncaughtException handler\n  //\n  // We are really limited in what we can do to get a stacktrace. So we use the\n  // tolerateNonErrors option to ensure that the resulting error communicates as\n  // such.\n  if (!tolerateNonErrors) {\n    if (isError(maybeError)) {\n      error = maybeError\n    } else {\n      error = createAndLogInputError(typeof maybeError)\n      internalFrames += 2\n    }\n  } else {\n    switch (typeof maybeError) {\n      case 'string':\n      case 'number':\n      case 'boolean':\n        error = new Error(String(maybeError))\n        internalFrames += 1\n        break\n      case 'function':\n        error = createAndLogInputError('function')\n        internalFrames += 2\n        break\n      case 'object':\n        if (maybeError !== null && isError(maybeError)) {\n          error = maybeError\n        } else if (maybeError !== null && hasNecessaryFields(maybeError)) {\n          error = new Error(maybeError.message || maybeError.errorMessage)\n          error.name = maybeError.name || maybeError.errorClass\n          internalFrames += 1\n        } else {\n          error = createAndLogInputError(maybeError === null ? 'null' : 'unsupported object')\n          internalFrames += 2\n        }\n        break\n      default:\n        error = createAndLogInputError('nothing')\n        internalFrames += 2\n    }\n  }\n\n  if (!hasStack(error)) {\n    // in IE10/11 a new Error() doesn't have a stacktrace until you throw it, so try that here\n    try {\n      throw error\n    } catch (e) {\n      if (hasStack(e)) {\n        error = e\n        // if the error only got a stacktrace after we threw it here, we know it\n        // will only have one extra internal frame from this function, regardless\n        // of whether it went through createAndLogInputError() or not\n        internalFrames = 1\n      }\n    }\n  }\n\n  return [error, internalFrames]\n}\n\n// default value for stacktrace.type\nEvent.__type = 'browserjs'\n\nconst hasNecessaryFields = error =>\n  (typeof error.name === 'string' || typeof error.errorClass === 'string') &&\n  (typeof error.message === 'string' || typeof error.errorMessage === 'string')\n\nmodule.exports = Event\n","module.exports = (callbacks, callbackArg, callbackType, logger) => {\n  let ignore = false\n  const cbs = callbacks.slice()\n  while (!ignore) {\n    if (!cbs.length) break\n    try {\n      ignore = cbs.pop()(callbackArg) === false\n    } catch (e) {\n      logger.error(`Error occurred in ${callbackType} callback, continuing anyway…`)\n      logger.error(e)\n    }\n  }\n  return ignore\n}\n","module.exports = function pad (num, size) {\n  var s = '000000000' + num;\n  return s.substr(s.length - size);\n};\n","var pad = require('./pad.js');\nvar os = require('os');\n\nfunction getHostname () {\n  try {\n      return os.hostname();\n  } catch (e) {\n    /**\n     * This is most likely Windows 7 which is known to cause os.hostname() to break\n     * @see https://github.com/nodejs/node/issues/41297\n     * @see https://github.com/libuv/libuv/issues/3260\n     *\n     * Fallback to take hostname from environment variables\n     * @see https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/hostname#notes\n     */\n    // eslint-disable-next-line no-underscore-dangle\n    return process.env._CLUSTER_NETWORK_NAME_ || process.env.COMPUTERNAME || 'hostname';\n    }\n}\n\nvar padding = 2,\n    pid = pad(process.pid.toString(36), padding),\n    hostname = getHostname(),\n    length = hostname.length,\n    hostId = pad(hostname\n      .split('')\n      .reduce(function (prev, char) {\n        return +prev + char.charCodeAt(0);\n      }, +length + 36)\n      .toString(36),\n    padding);\n\nmodule.exports = function fingerprint () {\n  return pid + hostId;\n};\n","/**\n * cuid.js\n * Collision-resistant UID generator for browsers and node.\n * Sequential for fast db lookups and recency sorting.\n * Safe for element IDs and server-side lookups.\n *\n * Extracted from CLCTR\n *\n * Copyright (c) Eric Elliott 2012\n * MIT License\n */\n\nvar fingerprint = require('./lib/fingerprint.js');\nvar isCuid = require('./lib/is-cuid.js');\nvar pad = require('./lib/pad.js');\n\nvar c = 0,\n  blockSize = 4,\n  base = 36,\n  discreteValues = Math.pow(base, blockSize);\n\nfunction randomBlock () {\n  return pad((Math.random() *\n    discreteValues << 0)\n    .toString(base), blockSize);\n}\n\nfunction safeCounter () {\n  c = c < discreteValues ? c : 0;\n  c++; // this is not subliminal\n  return c - 1;\n}\n\nfunction cuid () {\n  // Starting with a lowercase letter makes\n  // it HTML element ID friendly.\n  var letter = 'c', // hard-coded allows for sequential access\n\n    // timestamp\n    // warning: this exposes the exact date and time\n    // that the uid was created.\n    timestamp = new Date().getTime().toString(base),\n\n    // Prevent same-machine collisions.\n    counter = pad(safeCounter().toString(base), blockSize),\n\n    // A few chars to generate distinct ids for different\n    // clients (so different computers are far less\n    // likely to generate the same id)\n    print = fingerprint(),\n\n    // Grab some more chars from Math.random()\n    random = randomBlock() + randomBlock();\n\n  return letter + timestamp + counter + print + random;\n}\n\ncuid.fingerprint = fingerprint;\ncuid.isCuid = isCuid;\n\nmodule.exports = cuid;\n","/**\n * Check the provided value is a valid device id\n * @param {unknown} value\n * @returns\n */\nmodule.exports = function isCuid (value) {\n    return typeof value === 'string' && (/^c[a-z0-9]{20,32}$/).test(value);\n};\n","const cuid = require('@bugsnag/cuid')\n\nclass Session {\n  constructor () {\n    this.id = cuid()\n    this.startedAt = new Date()\n    this._handled = 0\n    this._unhandled = 0\n    this._user = {}\n    this.app = {}\n    this.device = {}\n  }\n\n  getUser () {\n    return this._user\n  }\n\n  setUser (id, email, name) {\n    this._user = { id, email, name }\n  }\n\n  toJSON () {\n    return {\n      id: this.id,\n      startedAt: this.startedAt,\n      events: { handled: this._handled, unhandled: this._unhandled }\n    }\n  }\n\n  _track (event) {\n    this[event._handledState.unhandled ? '_unhandled' : '_handled'] += 1\n  }\n}\n\nmodule.exports = Session\n","const config = require('./config')\nconst Event = require('./event')\nconst Breadcrumb = require('./breadcrumb')\nconst Session = require('./session')\nconst map = require('./lib/es-utils/map')\nconst includes = require('./lib/es-utils/includes')\nconst filter = require('./lib/es-utils/filter')\nconst reduce = require('./lib/es-utils/reduce')\nconst keys = require('./lib/es-utils/keys')\nconst assign = require('./lib/es-utils/assign')\nconst runCallbacks = require('./lib/callback-runner')\nconst metadataDelegate = require('./lib/metadata-delegate')\nconst runSyncCallbacks = require('./lib/sync-callback-runner')\nconst BREADCRUMB_TYPES = require('./lib/breadcrumb-types')\nconst { add, clear, merge } = require('./lib/feature-flag-delegate')\nconst HUB_PREFIX = '00000'\nconst HUB_NOTIFY = 'https://notify.insighthub.smartbear.com'\nconst HUB_SESSION = 'https://sessions.insighthub.smartbear.com'\n\nconst noop = () => { }\n\nclass Client {\n  constructor (configuration, schema = config.schema, internalPlugins = [], notifier) {\n    // notifier id\n    this._notifier = notifier\n\n    // intialise opts and config\n    this._config = {}\n    this._schema = schema\n\n    // i/o\n    this._delivery = { sendSession: noop, sendEvent: noop }\n    this._logger = { debug: noop, info: noop, warn: noop, error: noop }\n\n    // plugins\n    this._plugins = {}\n\n    // state\n    this._breadcrumbs = []\n    this._session = null\n    this._metadata = {}\n    this._featuresIndex = {}\n    this._features = []\n    this._context = undefined\n    this._user = {}\n    this._groupingDiscriminator = undefined\n\n    // callbacks:\n    //  e: onError\n    //  s: onSession\n    //  sp: onSessionPayload\n    //  b: onBreadcrumb\n    // (note these names are minified by hand because object\n    // properties are not safe to minify automatically)\n    this._cbs = {\n      e: [],\n      s: [],\n      sp: [],\n      b: []\n    }\n\n    // expose internal constructors\n    this.Client = Client\n    this.Event = Event\n    this.Breadcrumb = Breadcrumb\n    this.Session = Session\n\n    this._config = this._configure(configuration, internalPlugins)\n    map(internalPlugins.concat(this._config.plugins), pl => {\n      if (pl) this._loadPlugin(pl)\n    })\n\n    // when notify() is called we need to know how many frames are from our own source\n    // this inital value is 1 not 0 because we wrap notify() to ensure it is always\n    // bound to have the client as its `this` value – see below.\n    this._depth = 1\n\n    const self = this\n    const notify = this.notify\n    this.notify = function () {\n      return notify.apply(self, arguments)\n    }\n  }\n\n  addMetadata (section, keyOrObj, maybeVal) {\n    return metadataDelegate.add(this._metadata, section, keyOrObj, maybeVal)\n  }\n\n  getMetadata (section, key) {\n    return metadataDelegate.get(this._metadata, section, key)\n  }\n\n  clearMetadata (section, key) {\n    return metadataDelegate.clear(this._metadata, section, key)\n  }\n\n  addFeatureFlag (name, variant = null) {\n    add(this._features, this._featuresIndex, name, variant)\n  }\n\n  addFeatureFlags (featureFlags) {\n    merge(this._features, featureFlags, this._featuresIndex)\n  }\n\n  clearFeatureFlag (name) {\n    clear(this._features, this._featuresIndex, name)\n  }\n\n  clearFeatureFlags () {\n    this._features = []\n    this._featuresIndex = {}\n  }\n\n  getContext () {\n    return this._context\n  }\n\n  setContext (c) {\n    this._context = c\n  }\n\n  getGroupingDiscriminator () {\n    return this._groupingDiscriminator\n  }\n\n  setGroupingDiscriminator (value) {\n    const previousValue = this._groupingDiscriminator\n    if (typeof value === 'string' || value === null || value === undefined) this._groupingDiscriminator = value\n    return previousValue\n  }\n\n  _configure (opts, internalPlugins) {\n    const schema = reduce(internalPlugins, (schema, plugin) => {\n      if (plugin && plugin.configSchema) return assign({}, schema, plugin.configSchema)\n      return schema\n    }, this._schema)\n\n    // sendPayloadChecksums is false by default unless custom endpoints are not specified\n    if (!opts.endpoints) {\n      opts.sendPayloadChecksums = 'sendPayloadChecksums' in opts ? opts.sendPayloadChecksums : true\n    }\n\n    // accumulate configuration and error messages\n    const { errors, config } = reduce(keys(schema), (accum, key) => {\n      const defaultValue = schema[key].defaultValue(opts[key])\n\n      if (opts[key] !== undefined) {\n        const valid = schema[key].validate(opts[key])\n        if (!valid) {\n          accum.errors[key] = schema[key].message\n          accum.config[key] = defaultValue\n        } else {\n          if (schema[key].allowPartialObject) {\n            accum.config[key] = assign(defaultValue, opts[key])\n          } else {\n            accum.config[key] = opts[key]\n          }\n        }\n      } else {\n        accum.config[key] = defaultValue\n      }\n\n      return accum\n    }, { errors: {}, config: {} })\n\n    if (schema.apiKey) {\n      // missing api key is the only fatal error\n      if (!config.apiKey) throw new Error('No Bugsnag API Key set')\n      // warn about an apikey that is not of the expected format\n      if (!/^[0-9a-f]{32}$/i.test(config.apiKey)) errors.apiKey = 'should be a string of 32 hexadecimal characters'\n\n      if (opts.endpoints === undefined && config.apiKey.startsWith(HUB_PREFIX)) {\n        config.endpoints = {\n          notify: HUB_NOTIFY,\n          sessions: HUB_SESSION\n        }\n      }\n    }\n\n    // update and elevate some options\n    this._metadata = assign({}, config.metadata)\n    merge(this._features, config.featureFlags, this._featuresIndex)\n    this._user = assign({}, config.user)\n    this._context = config.context\n    if (config.logger) this._logger = config.logger\n\n    // add callbacks\n    if (config.onError) this._cbs.e = this._cbs.e.concat(config.onError)\n    if (config.onBreadcrumb) this._cbs.b = this._cbs.b.concat(config.onBreadcrumb)\n    if (config.onSession) this._cbs.s = this._cbs.s.concat(config.onSession)\n\n    // finally warn about any invalid config where we fell back to the default\n    if (keys(errors).length) {\n      this._logger.warn(generateConfigErrorMessage(errors, opts))\n    }\n\n    return config\n  }\n\n  getUser () {\n    return this._user\n  }\n\n  setUser (id, email, name) {\n    this._user = { id, email, name }\n  }\n\n  _loadPlugin (plugin) {\n    const result = plugin.load(this)\n    // JS objects are not the safest way to store arbitrarily keyed values,\n    // so bookend the key with some characters that prevent tampering with\n    // stuff like __proto__ etc. (only store the result if the plugin had a\n    // name)\n    if (plugin.name) this._plugins[`~${plugin.name}~`] = result\n  }\n\n  getPlugin (name) {\n    return this._plugins[`~${name}~`]\n  }\n\n  _setDelivery (d) {\n    this._delivery = d(this)\n  }\n\n  startSession () {\n    const session = new Session()\n\n    session.app.releaseStage = this._config.releaseStage\n    session.app.version = this._config.appVersion\n    session.app.type = this._config.appType\n\n    session._user = assign({}, this._user)\n\n    // run onSession callbacks\n    const ignore = runSyncCallbacks(this._cbs.s, session, 'onSession', this._logger)\n\n    if (ignore) {\n      this._logger.debug('Session not started due to onSession callback')\n      return this\n    }\n\n    return this._sessionDelegate.startSession(this, session)\n  }\n\n  addOnError (fn, front = false) {\n    this._cbs.e[front ? 'unshift' : 'push'](fn)\n  }\n\n  removeOnError (fn) {\n    this._cbs.e = filter(this._cbs.e, f => f !== fn)\n  }\n\n  _addOnSessionPayload (fn) {\n    this._cbs.sp.push(fn)\n  }\n\n  addOnSession (fn) {\n    this._cbs.s.push(fn)\n  }\n\n  removeOnSession (fn) {\n    this._cbs.s = filter(this._cbs.s, f => f !== fn)\n  }\n\n  addOnBreadcrumb (fn, front = false) {\n    this._cbs.b[front ? 'unshift' : 'push'](fn)\n  }\n\n  removeOnBreadcrumb (fn) {\n    this._cbs.b = filter(this._cbs.b, f => f !== fn)\n  }\n\n  pauseSession () {\n    return this._sessionDelegate.pauseSession(this)\n  }\n\n  resumeSession () {\n    return this._sessionDelegate.resumeSession(this)\n  }\n\n  leaveBreadcrumb (message, metadata, type) {\n    // coerce bad values so that the defaults get set\n    message = typeof message === 'string' ? message : ''\n    type = (typeof type === 'string' && includes(BREADCRUMB_TYPES, type)) ? type : 'manual'\n    metadata = typeof metadata === 'object' && metadata !== null ? metadata : {}\n\n    // if no message, discard\n    if (!message) return\n\n    const crumb = new Breadcrumb(message, metadata, type)\n\n    // run onBreadcrumb callbacks\n    const ignore = runSyncCallbacks(this._cbs.b, crumb, 'onBreadcrumb', this._logger)\n\n    if (ignore) {\n      this._logger.debug('Breadcrumb not attached due to onBreadcrumb callback')\n      return\n    }\n\n    // push the valid crumb onto the queue and maintain the length\n    this._breadcrumbs.push(crumb)\n    if (this._breadcrumbs.length > this._config.maxBreadcrumbs) {\n      this._breadcrumbs = this._breadcrumbs.slice(this._breadcrumbs.length - this._config.maxBreadcrumbs)\n    }\n  }\n\n  _isBreadcrumbTypeEnabled (type) {\n    const types = this._config.enabledBreadcrumbTypes\n\n    return types === null || includes(types, type)\n  }\n\n  notify (maybeError, onError, postReportCallback = noop) {\n    const event = Event.create(maybeError, true, undefined, 'notify()', this._depth + 1, this._logger)\n    this._notify(event, onError, postReportCallback)\n  }\n\n  _notify (event, onError, postReportCallback = noop) {\n    event.app = assign({}, event.app, {\n      releaseStage: this._config.releaseStage,\n      version: this._config.appVersion,\n      type: this._config.appType\n    })\n    event.context = event.context || this._context\n    event._metadata = assign({}, event._metadata, this._metadata)\n    event._user = assign({}, event._user, this._user)\n    event.breadcrumbs = this._breadcrumbs.slice()\n    event.setGroupingDiscriminator(this._groupingDiscriminator)\n    merge(event._features, this._features, event._featuresIndex)\n\n    // exit early if events should not be sent on the current releaseStage\n    if (this._config.enabledReleaseStages !== null && !includes(this._config.enabledReleaseStages, this._config.releaseStage)) {\n      this._logger.warn('Event not sent due to releaseStage/enabledReleaseStages configuration')\n      return postReportCallback(null, event)\n    }\n\n    const originalSeverity = event.severity\n\n    const onCallbackError = err => {\n      // errors in callbacks are tolerated but we want to log them out\n      this._logger.error('Error occurred in onError callback, continuing anyway…')\n      this._logger.error(err)\n    }\n\n    const callbacks = [].concat(this._cbs.e).concat(onError)\n    runCallbacks(callbacks, event, onCallbackError, (err, shouldSend) => {\n      if (err) onCallbackError(err)\n\n      if (!shouldSend) {\n        this._logger.debug('Event not sent due to onError callback')\n        return postReportCallback(null, event)\n      }\n\n      if (this._isBreadcrumbTypeEnabled('error')) {\n        // only leave a crumb for the error if actually got sent\n        Client.prototype.leaveBreadcrumb.call(this, event.errors[0].errorClass, {\n          errorClass: event.errors[0].errorClass,\n          errorMessage: event.errors[0].errorMessage,\n          severity: event.severity\n        }, 'error')\n      }\n\n      if (originalSeverity !== event.severity) {\n        event._handledState.severityReason = { type: 'userCallbackSetSeverity' }\n      }\n\n      if (event.unhandled !== event._handledState.unhandled) {\n        event._handledState.severityReason.unhandledOverridden = true\n        event._handledState.unhandled = event.unhandled\n      }\n\n      if (this._session) {\n        this._session._track(event)\n        event._session = this._session\n      }\n\n      this._delivery.sendEvent({\n        apiKey: event.apiKey || this._config.apiKey,\n        notifier: this._notifier,\n        events: [event]\n      }, (err) => postReportCallback(err, event))\n    })\n  }\n}\n\nconst generateConfigErrorMessage = (errors, rawInput) => {\n  const er = new Error(\n    `Invalid configuration\\n${map(keys(errors), key => `  - ${key} ${errors[key]}, got ${stringify(rawInput[key])}`).join('\\n\\n')}`)\n  return er\n}\n\nconst stringify = val => {\n  switch (typeof val) {\n    case 'string':\n    case 'number':\n    case 'object':\n      return JSON.stringify(val)\n    default: return String(val)\n  }\n}\n\nmodule.exports = Client\n","const some = require('./async-every')\n\nmodule.exports = (callbacks, event, onCallbackError, cb) => {\n  // This function is how we support different kinds of callback:\n  //  - synchronous - return value\n  //  - node-style async with callback - cb(err, value)\n  //  - promise/thenable - resolve(value)\n  // It normalises each of these into the lowest common denominator – a node-style callback\n  const runMaybeAsyncCallback = (fn, cb) => {\n    if (typeof fn !== 'function') return cb(null)\n    try {\n      // if function appears sync…\n      if (fn.length !== 2) {\n        const ret = fn(event)\n        // check if it returned a \"thenable\" (promise)\n        if (ret && typeof ret.then === 'function') {\n          return ret.then(\n            // resolve\n            val => setTimeout(() => cb(null, val)),\n            // reject\n            err => {\n              setTimeout(() => {\n                onCallbackError(err)\n                return cb(null, true)\n              })\n            }\n          )\n        }\n        return cb(null, ret)\n      }\n      // if function is async…\n      fn(event, (err, result) => {\n        if (err) {\n          onCallbackError(err)\n          return cb(null)\n        }\n        cb(null, result)\n      })\n    } catch (e) {\n      onCallbackError(e)\n      cb(null)\n    }\n  }\n\n  some(callbacks, runMaybeAsyncCallback, cb)\n}\n","// This is a heavily modified/simplified version of\n//   https://github.com/othiym23/async-some\n// with the logic flipped so that it is akin to the\n// synchronous \"every\" method instead of \"some\".\n\n// run the asynchronous test function (fn) over each item in the array (arr)\n// in series until:\n//   - fn(item, cb) => calls cb(null, false)\n//   - or the end of the array is reached\n// the callback (cb) will be passed (null, false) if any of the items in arr\n// caused fn to call back with false, otherwise it will be passed (null, true)\nmodule.exports = (arr, fn, cb) => {\n  let index = 0\n\n  const next = () => {\n    if (index >= arr.length) return cb(null, true)\n    fn(arr[index], (err, result) => {\n      if (err) return cb(err)\n      if (result === false) return cb(null, false)\n      index++\n      next()\n    })\n  }\n\n  next()\n}\n","const jsonStringify = require('@bugsnag/safe-json-stringify')\nconst EVENT_REDACTION_PATHS = [\n  'events.[].metaData',\n  'events.[].breadcrumbs.[].metaData',\n  'events.[].request'\n]\n\nmodule.exports.event = (event, redactedKeys) => {\n  let payload = jsonStringify(event, null, null, { redactedPaths: EVENT_REDACTION_PATHS, redactedKeys })\n  if (payload.length > 10e5) {\n    event.events[0]._metadata = {\n      notifier:\n`WARNING!\nSerialized payload was ${payload.length / 10e5}MB (limit = 1MB)\nmetadata was removed`\n    }\n    payload = jsonStringify(event, null, null, { redactedPaths: EVENT_REDACTION_PATHS, redactedKeys })\n  }\n  return payload\n}\n\nmodule.exports.session = (session, redactedKeys) => {\n  const payload = jsonStringify(session, null, null)\n  return payload\n}\n","const http = require('http')\nconst https = require('https')\n// eslint-disable-next-line node/no-deprecated-api\nconst { parse } = require('url')\n\nmodule.exports = ({ url, headers, body, agent }, cb) => {\n  let didError = false\n  const onError = (err) => {\n    if (didError) return\n    didError = true\n    cb(err)\n  }\n\n  const parsedUrl = parse(url)\n  const secure = parsedUrl.protocol === 'https:'\n  const transport = secure ? https : http\n  const req = transport.request({\n    method: 'POST',\n    hostname: parsedUrl.hostname,\n    port: parsedUrl.port,\n    path: parsedUrl.path,\n    headers,\n    agent\n  })\n  req.on('error', onError)\n  req.on('response', res => {\n    bufferResponse(res, (err, body) => {\n      if (err) return onError(err)\n      if (res.statusCode < 200 || res.statusCode >= 300) {\n        return onError(new Error(`Bad statusCode from API: ${res.statusCode}\\n${body}`))\n      }\n      cb(null, body)\n    })\n  })\n  req.write(body)\n  req.end()\n}\n\nconst bufferResponse = (stream, cb) => {\n  let data = ''\n  stream.on('error', cb)\n  stream.setEncoding('utf8')\n  stream.on('data', d => { data += d })\n  stream.on('end', () => cb(null, data))\n}\n","const payload = require('@bugsnag/core/lib/json-payload')\nconst request = require('./request')\n\nmodule.exports = (client) => ({\n  sendEvent: (event, cb = () => {}) => {\n    const body = payload.event(event, client._config.redactedKeys)\n\n    const _cb = err => {\n      if (err) client._logger.error(`Event failed to send…\\n${(err && err.stack) ? err.stack : err}`, err)\n      if (body.length > 10e5) {\n        client._logger.warn(`Event oversized (${(body.length / 10e5).toFixed(2)} MB)`)\n      }\n      cb(err)\n    }\n\n    if (client._config.endpoints.notify === null) {\n      const err = new Error('Event not sent due to incomplete endpoint configuration')\n      return _cb(err)\n    }\n\n    try {\n      request({\n        url: client._config.endpoints.notify,\n        headers: {\n          'Content-Type': 'application/json',\n          'Bugsnag-Api-Key': event.apiKey || client._config.apiKey,\n          'Bugsnag-Payload-Version': '4',\n          'Bugsnag-Sent-At': (new Date()).toISOString()\n        },\n        body,\n        agent: client._config.agent\n      }, (err, body) => _cb(err))\n    } catch (e) {\n      _cb(e)\n    }\n  },\n  sendSession: (session, cb = () => {}) => {\n    const _cb = err => {\n      if (err) client._logger.error(`Session failed to send…\\n${(err && err.stack) ? err.stack : err}`, err)\n      cb(err)\n    }\n\n    if (client._config.endpoints.session === null) {\n      const err = new Error('Session not sent due to incomplete endpoint configuration')\n      return _cb(err)\n    }\n\n    try {\n      request({\n        url: client._config.endpoints.sessions,\n        headers: {\n          'Content-Type': 'application/json',\n          'Bugsnag-Api-Key': client._config.apiKey,\n          'Bugsnag-Payload-Version': '1',\n          'Bugsnag-Sent-At': (new Date()).toISOString()\n        },\n        body: payload.session(session, client._config.redactedKeys),\n        agent: client._config.agent\n      }, err => _cb(err))\n    } catch (e) {\n      _cb(e)\n    }\n  }\n})\n","const { schema } = require('@bugsnag/core/config')\nconst stringWithLength = require('@bugsnag/core/lib/validators/string-with-length')\nconst os = require('os')\nconst { inspect } = require('util')\n\nmodule.exports = {\n  appType: {\n    ...schema.appType,\n    defaultValue: () => 'node'\n  },\n  projectRoot: {\n    defaultValue: () => process.cwd(),\n    validate: value => value === null || stringWithLength(value),\n    message: 'should be string'\n  },\n  hostname: {\n    defaultValue: () => os.hostname(),\n    message: 'should be a string',\n    validate: value => value === null || stringWithLength(value)\n  },\n  logger: {\n    ...schema.logger,\n    defaultValue: () => getPrefixedConsole()\n  },\n  releaseStage: {\n    ...schema.releaseStage,\n    defaultValue: () => process.env.NODE_ENV || 'production'\n  },\n  agent: {\n    defaultValue: () => undefined,\n    message: 'should be an HTTP(s) agent',\n    validate: value => value === undefined || isAgent(value)\n  },\n  onUncaughtException: {\n    defaultValue: () => (err, event, logger) => {\n      logger.error(`Uncaught exception${getContext(event)}, the process will now terminate…\\n${printError(err)}`)\n      process.exit(1)\n    },\n    message: 'should be a function',\n    validate: value => typeof value === 'function'\n  },\n  onUnhandledRejection: {\n    defaultValue: () => (err, event, logger) => {\n      logger.error(`Unhandled rejection${getContext(event)}…\\n${printError(err)}`)\n    },\n    message: 'should be a function',\n    validate: value => typeof value === 'function'\n  }\n}\n\nconst printError = err => err && err.stack ? err.stack : inspect(err)\n\nconst getPrefixedConsole = () => {\n  return ['debug', 'info', 'warn', 'error'].reduce((accum, method) => {\n    const consoleMethod = console[method] || console.log\n    accum[method] = consoleMethod.bind(console, '[bugsnag]')\n    return accum\n  }, {})\n}\n\nconst getContext = event =>\n  event.request && Object.keys(event.request).length\n    ? ` at ${event.request.httpMethod} ${event.request.path || event.request.url}`\n    : ''\n\nconst isAgent = value => (typeof value === 'object' && value !== null) || typeof value === 'boolean'\n","let appStart = new Date()\nconst reset = () => { appStart = new Date() }\n\nmodule.exports = {\n  name: 'appDuration',\n  load: client => {\n    client.addOnError(event => {\n      const now = new Date()\n\n      event.app.duration = now - appStart\n    }, true)\n\n    return { reset }\n  }\n}\n","const map = require('@bugsnag/core/lib/es-utils/map')\nconst reduce = require('@bugsnag/core/lib/es-utils/reduce')\nconst filter = require('@bugsnag/core/lib/es-utils/filter')\n\n/*\n * Leaves breadcrumbs when console log methods are called\n */\nexports.load = (client) => {\n  const isDev = /^(local-)?dev(elopment)?$/.test(client._config.releaseStage)\n\n  if (isDev || !client._isBreadcrumbTypeEnabled('log')) return\n\n  map(CONSOLE_LOG_METHODS, method => {\n    const original = console[method]\n    console[method] = (...args) => {\n      client.leaveBreadcrumb('Console output', reduce(args, (accum, arg, i) => {\n        // do the best/simplest stringification of each argument\n        let stringified = '[Unknown value]'\n        // this may fail if the input is:\n        // - an object whose [[Prototype]] is null (no toString)\n        // - an object with a broken toString or @@toPrimitive implementation\n        try { stringified = String(arg) } catch (e) {}\n        // if it stringifies to [object Object] attempt to JSON stringify\n        if (stringified === '[object Object]') {\n          // catch stringify errors and fallback to [object Object]\n          try { stringified = JSON.stringify(arg) } catch (e) {}\n        }\n        accum[`[${i}]`] = stringified\n        return accum\n      }, {\n        severity: method.indexOf('group') === 0 ? 'log' : method\n      }), 'log')\n      original.apply(console, args)\n    }\n    console[method]._restore = () => { console[method] = original }\n  })\n}\n\nif (process.env.NODE_ENV !== 'production') {\n  exports.destroy = () => CONSOLE_LOG_METHODS.forEach(method => {\n    if (typeof console[method]._restore === 'function') console[method]._restore()\n  })\n}\n\nconst CONSOLE_LOG_METHODS = filter(['log', 'debug', 'info', 'warn', 'error'], method =>\n  typeof console !== 'undefined' && typeof console[method] === 'function'\n)\n","const assign = require('./es-utils/assign')\n\nconst onCloneCallbacks = []\n\nmodule.exports = (client) => {\n  const clone = new client.Client({}, {}, [], client._notifier)\n\n  clone._config = client._config\n\n  // changes to these properties should not be reflected in the original client,\n  // so ensure they are are (shallow) cloned\n  clone._breadcrumbs = client._breadcrumbs.slice()\n  clone._metadata = assign({}, client._metadata)\n  clone._features = [...client._features]\n  clone._featuresIndex = assign({}, client._featuresIndex)\n  clone._user = assign({}, client._user)\n  clone._context = client._context\n\n  clone._cbs = {\n    e: client._cbs.e.slice(),\n    s: client._cbs.s.slice(),\n    sp: client._cbs.sp.slice(),\n    b: client._cbs.b.slice()\n  }\n\n  clone._logger = client._logger\n  clone._delivery = client._delivery\n  clone._sessionDelegate = client._sessionDelegate\n\n  onCloneCallbacks.forEach(callback => { callback(clone) })\n\n  return clone\n}\n\nmodule.exports.registerCallback = callback => { onCloneCallbacks.push(callback) }\n","// The utilities in this file are used to save the stackframes from a known execution context\n// to use when a subsequent error has no stack frames. This happens with a lot of\n// node's builtin async callbacks when they return from the native layer with no context\n// for example:\n//\n//   fs.readFile('does not exist', (err) => {\n//     /* node 8 */\n//     err.stack = \"ENOENT: no such file or directory, open 'nope'\"\n//     /* node 4,6 */\n//     err.stack = \"Error: ENOENT: no such file or directory, open 'nope'\\n    at Error (native)\"\n//   })\n\n// Gets the stack string for the current execution context\nexports.getStack = () => {\n  // slice(3) removes the first line + this function's frame + the caller's frame,\n  // so the stack begins with the caller of this function\n  return (new Error()).stack.split('\\n').slice(3).join('\\n')\n}\n\n// Given an Error and a fallbackStack from getStack(), use the fallbackStack\n// if error.stack has no genuine stackframes (according to the example above)\nexports.maybeUseFallbackStack = (err, fallbackStack) => {\n  const lines = err.stack.split('\\n')\n  if (lines.length === 1 || (lines.length === 2 && /at Error \\(native\\)/.test(lines[1]))) {\n    err.stack = `${lines[0]}\\n${fallbackStack}`\n  }\n  return err\n}\n","const { getStack } = require('@bugsnag/core/lib/node-fallback-stack')\nconst clone = require('@bugsnag/core/lib/clone-client')\n\nmodule.exports = {\n  name: 'contextualize',\n  load: client => {\n    const contextualize = (fn, onError) => {\n      // capture a stacktrace in case a resulting error has nothing\n      const fallbackStack = getStack()\n\n      const clonedClient = clone(client)\n\n      // add the stacktrace to the cloned client so it can be used later\n      // by the uncaught exception handler. Note the unhandled rejection\n      // handler does not need this because it gets a stacktrace\n      clonedClient.fallbackStack = fallbackStack\n\n      clonedClient.addOnError(onError)\n\n      client._clientContext.run(clonedClient, fn)\n    }\n\n    return contextualize\n  }\n}\n\n// add a default export for ESM modules without interop\nmodule.exports.default = module.exports\n","const { getStack, maybeUseFallbackStack } = require('@bugsnag/core/lib/node-fallback-stack')\n\nmodule.exports = {\n  name: 'intercept',\n  load: client => {\n    const intercept = (onError = () => {}, cb) => {\n      if (typeof cb !== 'function') {\n        cb = onError\n        onError = () => {}\n      }\n\n      // capture a stacktrace in case a resulting error has nothing\n      const fallbackStack = getStack()\n\n      return (err, ...data) => {\n        if (err) {\n          // check if the stacktrace has no context, if so, if so append the frames we created earlier\n          if (err.stack) maybeUseFallbackStack(err, fallbackStack)\n          const event = client.Event.create(err, true, {\n            severity: 'warning',\n            unhandled: false,\n            severityReason: { type: 'callbackErrorIntercept' }\n          }, 'intercept()', 1)\n          client._notify(event, onError)\n          return\n        }\n        cb(...data) // eslint-disable-line\n      }\n    }\n\n    return intercept\n  }\n}\n\n// add a default export for ESM modules without interop\nmodule.exports.default = module.exports\n","const os = require('os')\n\n/*\n * Automatically detects Node server details ('device' in the API)\n */\nmodule.exports = {\n  load: (client) => {\n    const device = {\n      osName: `${os.platform()} (${os.arch()})`,\n      osVersion: os.release(),\n      totalMemory: os.totalmem(),\n      hostname: client._config.hostname,\n      runtimeVersions: { node: process.versions.node }\n    }\n\n    client._addOnSessionPayload(sp => {\n      sp.device = {\n        ...sp.device,\n        ...device\n      }\n    })\n\n    // add time just as the event is sent\n    client.addOnError((event) => {\n      event.device = {\n        ...event.device,\n        ...device,\n        freeMemory: os.freemem(),\n        time: new Date()\n      }\n    }, true)\n  }\n}\n","const { join, resolve } = require('path')\n\n// normalise a path to a directory, adding a trailing slash if it doesn't already\n// have one and resolve it to make it absolute (e.g. get rid of any \"..\"s)\nmodule.exports = p => join(resolve(p), '/')\n","const normalizePath = require('@bugsnag/core/lib/path-normalizer')\n\nmodule.exports = {\n  load: client => client.addOnError(event => {\n    if (!client._config.projectRoot) return\n    const projectRoot = normalizePath(client._config.projectRoot)\n    const allFrames = event.errors.reduce((accum, er) => accum.concat(er.stacktrace), [])\n    allFrames.map(stackframe => {\n      stackframe.inProject = typeof stackframe.file === 'string' &&\n        stackframe.file.indexOf(projectRoot) === 0 &&\n        !/\\/node_modules\\//.test(stackframe.file)\n    })\n  })\n}\n","const SURROUNDING_LINES = 3\nconst MAX_LINE_LENGTH = 200\n\nconst { createReadStream } = require('fs')\nconst { Writable } = require('stream')\nconst pump = require('pump')\nconst byline = require('byline')\nconst path = require('path')\n\nmodule.exports = {\n  load: client => {\n    if (!client._config.sendCode) return\n\n    const loadSurroundingCode = (stackframe, cache) => new Promise((resolve, reject) => {\n      try {\n        if (!stackframe.lineNumber || !stackframe.file) return resolve(stackframe)\n        const file = path.resolve(client._config.projectRoot, stackframe.file)\n        const cacheKey = `${file}@${stackframe.lineNumber}`\n        if (cacheKey in cache) {\n          stackframe.code = cache[cacheKey]\n          return resolve(stackframe)\n        }\n        getSurroundingCode(file, stackframe.lineNumber, (err, code) => {\n          if (err) return resolve(stackframe)\n          stackframe.code = cache[cacheKey] = code\n          return resolve(stackframe)\n        })\n      } catch (e) {\n        return resolve(stackframe)\n      }\n    })\n\n    client.addOnError(event => new Promise((resolve, reject) => {\n      const cache = Object.create(null)\n      const allFrames = event.errors.reduce((accum, er) => accum.concat(er.stacktrace), [])\n      pMapSeries(allFrames.map(stackframe => () => loadSurroundingCode(stackframe, cache)))\n        .then(resolve)\n        .catch(reject)\n    }))\n  },\n  configSchema: {\n    sendCode: {\n      defaultValue: () => true,\n      validate: value => value === true || value === false,\n      message: 'should be true or false'\n    }\n  }\n}\n\nconst getSurroundingCode = (file, lineNumber, cb) => {\n  const start = lineNumber - SURROUNDING_LINES\n  const end = lineNumber + SURROUNDING_LINES\n\n  const reader = createReadStream(file, { encoding: 'utf8' })\n  const splitter = new byline.LineStream({ keepEmptyLines: true })\n  const slicer = new CodeRange({ start, end })\n\n  // if the slicer has enough lines already, no need to keep reading from the file\n  slicer.on('done', () => reader.destroy())\n\n  pump(reader, splitter, slicer, (err) => {\n    // reader.destroy() causes a \"premature close\" error which we can tolerate\n    if (err && err.message !== 'premature close') return cb(err)\n    cb(null, slicer.getCode())\n  })\n}\n\n// This writable stream takes { start, end } options specifying the\n// range of lines that should be extracted from a file. Pipe a readable\n// stream to it that provides source lines as each chunk. If the range\n// is satisfied before the end of the readable stream, it will emit the\n// 'done' event. Once a 'done' or 'finish' event has been seen, call getCode()\n// to get the range in the following format:\n// {\n//   '10': 'function getSquare (cb) {',\n//   '11': '  rectangles.find({',\n//   '12': '    length: 12',\n//   '13': '    width: 12',\n//   '14': '  }, err => cb)',\n//   '15': '}'\n// }\nclass CodeRange extends Writable {\n  constructor (opts) {\n    super({ ...opts, decodeStrings: false })\n    this._start = opts.start\n    this._end = opts.end\n    this._n = 0\n    this._code = {}\n  }\n\n  _write (chunk, enc, cb) {\n    this._n++\n    if (this._n < this._start) return cb(null)\n    if (this._n <= this._end) {\n      this._code[String(this._n)] = chunk.length <= MAX_LINE_LENGTH ? chunk : chunk.substr(0, MAX_LINE_LENGTH)\n      return cb(null)\n    }\n    this.emit('done')\n    return cb(null)\n  }\n\n  getCode () {\n    return this._code\n  }\n}\n\nconst pMapSeries = (ps) => {\n  return new Promise((resolve, reject) => {\n    const res = []\n    ps\n      .reduce((accum, p) => {\n        return accum.then(r => {\n          res.push(r)\n          return p()\n        })\n      }, Promise.resolve())\n      .then(r => { res.push(r) })\n      .then(() => { resolve(res.slice(1)) })\n  })\n}\n","const { maybeUseFallbackStack } = require('@bugsnag/core/lib/node-fallback-stack')\n\nlet _handler\nmodule.exports = {\n  load: client => {\n    if (!client._config.autoDetectErrors) return\n    if (!client._config.enabledErrorTypes.unhandledExceptions) return\n    _handler = err => {\n      // if we are in an async context, use the client from that context\n      const ctx = client._clientContext && client._clientContext.getStore()\n      const c = ctx || client\n\n      // check if the stacktrace has no context, if so append the frames we created earlier\n      // see plugin-contextualize for where this is created\n      if (err.stack && c.fallbackStack) maybeUseFallbackStack(err, c.fallbackStack)\n\n      const event = c.Event.create(err, false, {\n        severity: 'error',\n        unhandled: true,\n        severityReason: { type: 'unhandledException' }\n      }, 'uncaughtException handler', 1)\n      return new Promise(resolve => {\n        c._notify(event, () => {}, (e, event) => {\n          if (e) c._logger.error('Failed to send event to Bugsnag')\n          c._config.onUncaughtException(err, event, c._logger)\n          resolve()\n        })\n      })\n    }\n    process.prependListener('uncaughtException', _handler)\n  },\n  destroy: () => {\n    process.removeListener('uncaughtException', _handler)\n  }\n}\n","let _handler\nmodule.exports = {\n  load: client => {\n    if (!client._config.autoDetectErrors || !client._config.enabledErrorTypes.unhandledRejections) return\n    _handler = err => {\n      // if we are in an async context, use the client from that context\n      const ctx = client._clientContext && client._clientContext.getStore()\n      const c = ctx || client\n\n      // Report unhandled promise rejections as handled if the user has configured it\n      const unhandled = !client._config.reportUnhandledPromiseRejectionsAsHandled\n\n      const event = c.Event.create(err, false, {\n        severity: 'error',\n        unhandled,\n        severityReason: { type: 'unhandledPromiseRejection' }\n      }, 'unhandledRejection handler', 1)\n\n      return new Promise(resolve => {\n        c._notify(event, () => {}, (e, event) => {\n          if (e) c._logger.error('Failed to send event to Bugsnag')\n          c._config.onUnhandledRejection(err, event, c._logger)\n          resolve()\n        })\n      })\n    }\n\n    // Prepend the listener if we can (Node 6+)\n    if (process.prependListener) {\n      process.prependListener('unhandledRejection', _handler)\n    } else {\n      process.on('unhandledRejection', _handler)\n    }\n  },\n  destroy: () => {\n    process.removeListener('unhandledRejection', _handler)\n  }\n}\n","\n/**\n * Expose `Backoff`.\n */\n\nmodule.exports = Backoff;\n\n/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\n\nfunction Backoff(opts) {\n  opts = opts || {};\n  this.ms = opts.min || 100;\n  this.max = opts.max || 10000;\n  this.factor = opts.factor || 2;\n  this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n  this.attempts = 0;\n}\n\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\n\nBackoff.prototype.duration = function(){\n  var ms = this.ms * Math.pow(this.factor, this.attempts++);\n  if (this.jitter) {\n    var rand =  Math.random();\n    var deviation = Math.floor(rand * this.jitter * ms);\n    ms = (Math.floor(rand * 10) & 1) == 0  ? ms - deviation : ms + deviation;\n  }\n  return Math.min(ms, this.max) | 0;\n};\n\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\n\nBackoff.prototype.reset = function(){\n  this.attempts = 0;\n};\n","const DEFAULT_SUMMARY_INTERVAL = 10 * 1000\nconst Emitter = require('events').EventEmitter\n\nmodule.exports = class SessionTracker extends Emitter {\n  constructor (intervalLength) {\n    super()\n    this._sessions = new Map()\n    this._interval = null\n    this._intervalLength = intervalLength || DEFAULT_SUMMARY_INTERVAL\n\n    this._summarize = this._summarize.bind(this)\n  }\n\n  start () {\n    if (!this._interval) {\n      this._interval = setInterval(this._summarize, this._intervalLength).unref()\n    }\n  }\n\n  stop () {\n    clearInterval(this._interval)\n    this._interval = null\n  }\n\n  track (session) {\n    const key = dateToMsKey(session.startedAt)\n    const cur = this._sessions.get(key)\n    this._sessions.set(key, typeof cur === 'undefined' ? 1 : cur + 1)\n    return session\n  }\n\n  _summarize () {\n    const summary = []\n    this._sessions.forEach((val, key) => {\n      summary.push({ startedAt: key, sessionsStarted: val })\n      this._sessions.delete(key)\n    })\n    if (!summary.length) return\n    this.emit('summary', summary)\n  }\n}\n\nconst dateToMsKey = (d) => {\n  const dk = new Date(d)\n  dk.setSeconds(0)\n  dk.setMilliseconds(0)\n  return dk.toISOString()\n}\n","const intRange = require('@bugsnag/core/lib/validators/int-range')\nconst SessionTracker = require('./tracker')\nconst Backoff = require('backo')\nconst runSyncCallbacks = require('@bugsnag/core/lib/sync-callback-runner')\n\nmodule.exports = {\n  load: (client) => {\n    const sessionTracker = new SessionTracker(client._config.sessionSummaryInterval)\n    sessionTracker.on('summary', sendSessionSummary(client))\n    sessionTracker.start()\n    client._sessionDelegate = {\n      startSession: (client, session) => {\n        client._session = session\n        client._pausedSession = null\n        sessionTracker.track(client._session)\n        return client\n      },\n      pauseSession: (client) => {\n        client._pausedSession = client._session\n        client._session = null\n      },\n      resumeSession: (client) => {\n        // Do nothing if there's already an active session\n        if (client._session) {\n          return client\n        }\n\n        // If we have a paused session then make it the active session\n        if (client._pausedSession) {\n          client._session = client._pausedSession\n          client._pausedSession = null\n          return client\n        }\n\n        // Otherwise start a new session\n        return client.startSession()\n      }\n    }\n  },\n  configSchema: {\n    sessionSummaryInterval: {\n      defaultValue: () => undefined,\n      validate: value => value === undefined || intRange()(value),\n      message: 'should be a positive integer'\n    }\n  }\n}\n\nconst sendSessionSummary = client => sessionCounts => {\n  // exit early if the current releaseStage is not enabled\n  if (client._config.enabledReleaseStages !== null && !client._config.enabledReleaseStages.includes(client._config.releaseStage)) {\n    client._logger.warn('Session not sent due to releaseStage/enabledReleaseStages configuration')\n    return\n  }\n\n  if (!sessionCounts.length) return\n\n  const backoff = new Backoff({ min: 1000, max: 10000 })\n  const maxAttempts = 10\n  req(handleRes)\n\n  function handleRes (err) {\n    if (!err) {\n      const sessionCount = sessionCounts.reduce((accum, s) => accum + s.sessionsStarted, 0)\n      return client._logger.debug(`${sessionCount} session(s) reported`)\n    }\n    if (backoff.attempts === 10) {\n      client._logger.error('Session delivery failed, max retries exceeded', err)\n      return\n    }\n    client._logger.debug('Session delivery failed, retry #' + (backoff.attempts + 1) + '/' + maxAttempts, err)\n    setTimeout(() => req(handleRes), backoff.duration())\n  }\n\n  function req (cb) {\n    const payload = {\n      notifier: client._notifier,\n      device: {},\n      app: {\n        releaseStage: client._config.releaseStage,\n        version: client._config.appVersion,\n        type: client._config.appType\n      },\n      sessionCounts\n    }\n\n    const ignore = runSyncCallbacks(client._cbs.sp, payload, 'onSessionPayload', client._logger)\n    if (ignore) {\n      client._logger.debug('Session not sent due to onSessionPayload callback')\n      return cb(null)\n    }\n\n    client._delivery.sendSession(payload, cb)\n  }\n}\n","const normalizePath = require('@bugsnag/core/lib/path-normalizer')\n\nmodule.exports = {\n  load: client => client.addOnError(event => {\n    if (!client._config.projectRoot) return\n    const projectRoot = normalizePath(client._config.projectRoot)\n    const allFrames = event.errors.reduce((accum, er) => accum.concat(er.stacktrace), [])\n    allFrames.map(stackframe => {\n      if (typeof stackframe.file === 'string' && stackframe.file.indexOf(projectRoot) === 0) {\n        stackframe.file = stackframe.file.replace(projectRoot, '')\n      }\n    })\n  })\n}\n","const name = 'Bugsnag Node'\nconst version = '8.6.0'\nconst url = 'https://github.com/bugsnag/bugsnag-js'\n\nconst { AsyncLocalStorage } = require('async_hooks')\n\nconst Client = require('@bugsnag/core/client')\nconst Event = require('@bugsnag/core/event')\nconst Session = require('@bugsnag/core/session')\nconst Breadcrumb = require('@bugsnag/core/breadcrumb')\n\nEvent.__type = 'nodejs'\n\nconst delivery = require('@bugsnag/delivery-node')\n\n// extend the base config schema with some node-specific options\nconst schema = { ...require('@bugsnag/core/config').schema, ...require('./config') }\n\nconst pluginApp = require('@bugsnag/plugin-app-duration')\nconst pluginSurroundingCode = require('@bugsnag/plugin-node-surrounding-code')\nconst pluginInProject = require('@bugsnag/plugin-node-in-project')\nconst pluginStripProjectRoot = require('@bugsnag/plugin-strip-project-root')\nconst pluginServerSession = require('@bugsnag/plugin-server-session')\nconst pluginNodeDevice = require('@bugsnag/plugin-node-device')\nconst pluginNodeUncaughtException = require('@bugsnag/plugin-node-uncaught-exception')\nconst pluginNodeUnhandledRejection = require('@bugsnag/plugin-node-unhandled-rejection')\nconst pluginIntercept = require('@bugsnag/plugin-intercept')\nconst pluginContextualize = require('@bugsnag/plugin-contextualize')\nconst pluginStackframePathNormaliser = require('@bugsnag/plugin-stackframe-path-normaliser')\nconst pluginConsoleBreadcrumbs = require('@bugsnag/plugin-console-breadcrumbs')\n\nconst internalPlugins = [\n  pluginApp,\n  pluginSurroundingCode,\n  pluginInProject,\n  pluginStripProjectRoot,\n  pluginServerSession,\n  pluginNodeDevice,\n  pluginNodeUncaughtException,\n  pluginNodeUnhandledRejection,\n  pluginIntercept,\n  pluginContextualize,\n  pluginStackframePathNormaliser,\n  pluginConsoleBreadcrumbs\n]\n\nconst Bugsnag = {\n  _client: null,\n  createClient: (opts) => {\n    // handle very simple use case where user supplies just the api key as a string\n    if (typeof opts === 'string') opts = { apiKey: opts }\n    if (!opts) opts = {}\n\n    const bugsnag = new Client(opts, schema, internalPlugins, { name, version, url })\n\n    /**\n     * Patch all calls to the client in order to forwards them to the context client if it exists\n     *\n     * This is useful for when client methods are called later, such as in the console breadcrumbs\n     * plugin where we want to call `leaveBreadcrumb` on the request-scoped client, if it exists.\n     */\n    Object.keys(Client.prototype).forEach((m) => {\n      const original = bugsnag[m]\n      bugsnag[m] = function () {\n        // if we are in an async context, use the client from that context\n        const contextClient = bugsnag._clientContext && typeof bugsnag._clientContext.getStore === 'function' ? bugsnag._clientContext.getStore() : null\n        const client = contextClient || bugsnag\n        const originalMethod = contextClient ? contextClient[m] : original\n\n        client._depth += 1\n        const ret = originalMethod.apply(client, arguments)\n        client._depth -= 1\n        return ret\n      }\n    })\n\n    // Used to store and retrieve the request-scoped client which makes it easy to obtain the request-scoped client\n    // from anywhere in the codebase e.g. when calling Bugsnag.leaveBreadcrumb() or even within the global unhandled\n    // promise rejection handler.\n    bugsnag._clientContext = new AsyncLocalStorage()\n\n    bugsnag._setDelivery(delivery)\n\n    bugsnag._logger.debug('Loaded!')\n\n    return bugsnag\n  },\n  start: (opts) => {\n    if (Bugsnag._client) {\n      Bugsnag._client._logger.warn('Bugsnag.start() was called more than once. Ignoring.')\n      return Bugsnag._client\n    }\n    Bugsnag._client = Bugsnag.createClient(opts)\n    return Bugsnag._client\n  },\n  isStarted: () => {\n    return Bugsnag._client != null\n  }\n}\n\nObject.keys(Client.prototype).forEach((m) => {\n  if (/^_/.test(m)) return\n  Bugsnag[m] = function () {\n    // if we are in an async context, use the client from that context\n    let client = Bugsnag._client\n    const ctx = client && client._clientContext && client._clientContext.getStore()\n    if (ctx) {\n      client = ctx\n    }\n\n    if (!client) return console.error(`Bugsnag.${m}() was called before Bugsnag.start()`)\n\n    client._depth += 1\n    const ret = client[m].apply(client, arguments)\n    client._depth -= 1\n    return ret\n  }\n})\n\nmodule.exports = Bugsnag\n\nmodule.exports.Client = Client\nmodule.exports.Event = Event\nmodule.exports.Session = Session\nmodule.exports.Breadcrumb = Breadcrumb\n\n// Export a \"default\" property for compatibility with ESM imports\nmodule.exports.default = Bugsnag\n","module.exports = {\n  load (client) {\n    client.addOnError(event => {\n      const allFrames = event.errors.reduce((accum, er) => accum.concat(er.stacktrace), [])\n\n      allFrames.forEach(stackframe => {\n        if (typeof stackframe.file !== 'string') {\n          return\n        }\n\n        stackframe.file = stackframe.file.replace(/\\\\/g, '/')\n      })\n    })\n  }\n}\n","\nreturn _$notifier_38;\n\n});\n"]}