{"version":3,"file":"airbrakeErrorHandling-CeSjC7o-.js","sources":["../../../node_modules/promise-polyfill/src/finally.js","../../../node_modules/promise-polyfill/src/allSettled.js","../../../node_modules/promise-polyfill/src/any.js","../../../node_modules/promise-polyfill/src/index.js","../../../node_modules/@airbrake/browser/esm/jsonify_notice.js","../../../node_modules/@airbrake/browser/esm/metrics.js","../../../node_modules/@airbrake/browser/esm/scope.js","../../../node_modules/stackframe/stackframe.js","../../../node_modules/error-stack-parser/error-stack-parser.js","../../../node_modules/@airbrake/browser/esm/processor/esp.js","../../../node_modules/@airbrake/browser/esm/filter/angular_message.js","../../../node_modules/@airbrake/browser/esm/filter/debounce.js","../../../node_modules/@airbrake/browser/esm/filter/ignore_noise.js","../../../node_modules/@airbrake/browser/esm/filter/uncaught_message.js","../../../node_modules/cross-fetch/dist/browser-ponyfill.js","../../../node_modules/@airbrake/browser/esm/http_req/api.js","../../../node_modules/@airbrake/browser/esm/http_req/fetch.js","../../../node_modules/@airbrake/browser/esm/http_req/node.js","../../../node_modules/@airbrake/browser/esm/http_req/index.js","../../../node_modules/@airbrake/browser/esm/tdshared.js","../../../node_modules/@airbrake/browser/esm/queries.js","../../../node_modules/@airbrake/browser/esm/queues.js","../../../node_modules/@airbrake/browser/esm/routes.js","../../../node_modules/@airbrake/browser/esm/version.js","../../../node_modules/@airbrake/browser/esm/remote_settings.js","../../../node_modules/@airbrake/browser/esm/base_notifier.js","../../../node_modules/@airbrake/browser/esm/filter/window.js","../../../node_modules/@airbrake/browser/esm/instrumentation/console.js","../../../node_modules/@airbrake/browser/esm/instrumentation/dom.js","../../../node_modules/@airbrake/browser/esm/instrumentation/fetch.js","../../../node_modules/@airbrake/browser/esm/instrumentation/location.js","../../../node_modules/@airbrake/browser/esm/instrumentation/xhr.js","../../../node_modules/@airbrake/browser/esm/notifier.js","../../../app/javascript/entrypoints/airbrakeErrorHandling.js"],"sourcesContent":["/**\n * @this {Promise}\n */\nfunction finallyConstructor(callback) {\n  var constructor = this.constructor;\n  return this.then(\n    function(value) {\n      // @ts-ignore\n      return constructor.resolve(callback()).then(function() {\n        return value;\n      });\n    },\n    function(reason) {\n      // @ts-ignore\n      return constructor.resolve(callback()).then(function() {\n        // @ts-ignore\n        return constructor.reject(reason);\n      });\n    }\n  );\n}\n\nexport default finallyConstructor;\n","function allSettled(arr) {\n  var P = this;\n  return new P(function(resolve, reject) {\n    if (!(arr && typeof arr.length !== 'undefined')) {\n      return reject(\n        new TypeError(\n          typeof arr +\n            ' ' +\n            arr +\n            ' is not iterable(cannot read property Symbol(Symbol.iterator))'\n        )\n      );\n    }\n    var args = Array.prototype.slice.call(arr);\n    if (args.length === 0) return resolve([]);\n    var remaining = args.length;\n\n    function res(i, val) {\n      if (val && (typeof val === 'object' || typeof val === 'function')) {\n        var then = val.then;\n        if (typeof then === 'function') {\n          then.call(\n            val,\n            function(val) {\n              res(i, val);\n            },\n            function(e) {\n              args[i] = { status: 'rejected', reason: e };\n              if (--remaining === 0) {\n                resolve(args);\n              }\n            }\n          );\n          return;\n        }\n      }\n      args[i] = { status: 'fulfilled', value: val };\n      if (--remaining === 0) {\n        resolve(args);\n      }\n    }\n\n    for (var i = 0; i < args.length; i++) {\n      res(i, args[i]);\n    }\n  });\n}\n\nexport default allSettled;\n","/**\n * @constructor\n */\nfunction AggregateError(errors, message) {\n  (this.name = 'AggregateError'), (this.errors = errors);\n  this.message = message || '';\n}\nAggregateError.prototype = Error.prototype;\n\nfunction any(arr) {\n  var P = this;\n  return new P(function(resolve, reject) {\n    if (!(arr && typeof arr.length !== 'undefined')) {\n      return reject(new TypeError('Promise.any accepts an array'));\n    }\n\n    var args = Array.prototype.slice.call(arr);\n    if (args.length === 0) return reject();\n\n    var rejectionReasons = [];\n    for (var i = 0; i < args.length; i++) {\n      try {\n        P.resolve(args[i])\n          .then(resolve)\n          .catch(function(error) {\n            rejectionReasons.push(error);\n            if (rejectionReasons.length === args.length) {\n              reject(\n                new AggregateError(\n                  rejectionReasons,\n                  'All promises were rejected'\n                )\n              );\n            }\n          });\n      } catch (ex) {\n        reject(ex);\n      }\n    }\n  });\n}\n\nexport default any;\n","import promiseFinally from './finally';\nimport allSettled from './allSettled';\nimport any from './any';\n\n// Store setTimeout reference so promise-polyfill will be unaffected by\n// other code modifying setTimeout (like sinon.useFakeTimers())\nvar setTimeoutFunc = setTimeout;\n\nfunction isArray(x) {\n  return Boolean(x && typeof x.length !== 'undefined');\n}\n\nfunction noop() {}\n\n// Polyfill for Function.prototype.bind\nfunction bind(fn, thisArg) {\n  return function() {\n    fn.apply(thisArg, arguments);\n  };\n}\n\n/**\n * @constructor\n * @param {Function} fn\n */\nfunction Promise(fn) {\n  if (!(this instanceof Promise))\n    throw new TypeError('Promises must be constructed via new');\n  if (typeof fn !== 'function') throw new TypeError('not a function');\n  /** @type {!number} */\n  this._state = 0;\n  /** @type {!boolean} */\n  this._handled = false;\n  /** @type {Promise|undefined} */\n  this._value = undefined;\n  /** @type {!Array<!Function>} */\n  this._deferreds = [];\n\n  doResolve(fn, this);\n}\n\nfunction handle(self, deferred) {\n  while (self._state === 3) {\n    self = self._value;\n  }\n  if (self._state === 0) {\n    self._deferreds.push(deferred);\n    return;\n  }\n  self._handled = true;\n  Promise._immediateFn(function() {\n    var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n    if (cb === null) {\n      (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n      return;\n    }\n    var ret;\n    try {\n      ret = cb(self._value);\n    } catch (e) {\n      reject(deferred.promise, e);\n      return;\n    }\n    resolve(deferred.promise, ret);\n  });\n}\n\nfunction resolve(self, newValue) {\n  try {\n    // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n    if (newValue === self)\n      throw new TypeError('A promise cannot be resolved with itself.');\n    if (\n      newValue &&\n      (typeof newValue === 'object' || typeof newValue === 'function')\n    ) {\n      var then = newValue.then;\n      if (newValue instanceof Promise) {\n        self._state = 3;\n        self._value = newValue;\n        finale(self);\n        return;\n      } else if (typeof then === 'function') {\n        doResolve(bind(then, newValue), self);\n        return;\n      }\n    }\n    self._state = 1;\n    self._value = newValue;\n    finale(self);\n  } catch (e) {\n    reject(self, e);\n  }\n}\n\nfunction reject(self, newValue) {\n  self._state = 2;\n  self._value = newValue;\n  finale(self);\n}\n\nfunction finale(self) {\n  if (self._state === 2 && self._deferreds.length === 0) {\n    Promise._immediateFn(function() {\n      if (!self._handled) {\n        Promise._unhandledRejectionFn(self._value);\n      }\n    });\n  }\n\n  for (var i = 0, len = self._deferreds.length; i < len; i++) {\n    handle(self, self._deferreds[i]);\n  }\n  self._deferreds = null;\n}\n\n/**\n * @constructor\n */\nfunction Handler(onFulfilled, onRejected, promise) {\n  this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n  this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n  this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, self) {\n  var done = false;\n  try {\n    fn(\n      function(value) {\n        if (done) return;\n        done = true;\n        resolve(self, value);\n      },\n      function(reason) {\n        if (done) return;\n        done = true;\n        reject(self, reason);\n      }\n    );\n  } catch (ex) {\n    if (done) return;\n    done = true;\n    reject(self, ex);\n  }\n}\n\nPromise.prototype['catch'] = function(onRejected) {\n  return this.then(null, onRejected);\n};\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n  // @ts-ignore\n  var prom = new this.constructor(noop);\n\n  handle(this, new Handler(onFulfilled, onRejected, prom));\n  return prom;\n};\n\nPromise.prototype['finally'] = promiseFinally;\n\nPromise.all = function(arr) {\n  return new Promise(function(resolve, reject) {\n    if (!isArray(arr)) {\n      return reject(new TypeError('Promise.all accepts an array'));\n    }\n\n    var args = Array.prototype.slice.call(arr);\n    if (args.length === 0) return resolve([]);\n    var remaining = args.length;\n\n    function res(i, val) {\n      try {\n        if (val && (typeof val === 'object' || typeof val === 'function')) {\n          var then = val.then;\n          if (typeof then === 'function') {\n            then.call(\n              val,\n              function(val) {\n                res(i, val);\n              },\n              reject\n            );\n            return;\n          }\n        }\n        args[i] = val;\n        if (--remaining === 0) {\n          resolve(args);\n        }\n      } catch (ex) {\n        reject(ex);\n      }\n    }\n\n    for (var i = 0; i < args.length; i++) {\n      res(i, args[i]);\n    }\n  });\n};\n\nPromise.any = any;\n\nPromise.allSettled = allSettled;\n\nPromise.resolve = function(value) {\n  if (value && typeof value === 'object' && value.constructor === Promise) {\n    return value;\n  }\n\n  return new Promise(function(resolve) {\n    resolve(value);\n  });\n};\n\nPromise.reject = function(value) {\n  return new Promise(function(resolve, reject) {\n    reject(value);\n  });\n};\n\nPromise.race = function(arr) {\n  return new Promise(function(resolve, reject) {\n    if (!isArray(arr)) {\n      return reject(new TypeError('Promise.race accepts an array'));\n    }\n\n    for (var i = 0, len = arr.length; i < len; i++) {\n      Promise.resolve(arr[i]).then(resolve, reject);\n    }\n  });\n};\n\n// Use polyfill for setImmediate for performance gains\nPromise._immediateFn =\n  // @ts-ignore\n  (typeof setImmediate === 'function' &&\n    function(fn) {\n      // @ts-ignore\n      setImmediate(fn);\n    }) ||\n  function(fn) {\n    setTimeoutFunc(fn, 0);\n  };\n\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n  if (typeof console !== 'undefined' && console) {\n    console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n  }\n};\n\nexport default Promise;\n","var FILTERED = '[Filtered]';\nvar MAX_OBJ_LENGTH = 128;\n// jsonifyNotice serializes notice to JSON and truncates params,\n// environment and session keys.\nexport function jsonifyNotice(notice, _a) {\n    var _b = _a === void 0 ? {} : _a, _c = _b.maxLength, maxLength = _c === void 0 ? 64000 : _c, _d = _b.keysBlocklist, keysBlocklist = _d === void 0 ? [] : _d;\n    if (notice.errors) {\n        for (var i = 0; i < notice.errors.length; i++) {\n            var t = new Truncator({ keysBlocklist: keysBlocklist });\n            notice.errors[i] = t.truncate(notice.errors[i]);\n        }\n    }\n    var s = '';\n    var keys = ['params', 'environment', 'session'];\n    for (var level = 0; level < 8; level++) {\n        var opts = { level: level, keysBlocklist: keysBlocklist };\n        for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n            var key = keys_1[_i];\n            var obj = notice[key];\n            if (obj) {\n                notice[key] = truncate(obj, opts);\n            }\n        }\n        s = JSON.stringify(notice);\n        if (s.length < maxLength) {\n            return s;\n        }\n    }\n    var params = {\n        json: s.slice(0, Math.floor(maxLength / 2)) + '...',\n    };\n    keys.push('errors');\n    for (var _e = 0, keys_2 = keys; _e < keys_2.length; _e++) {\n        var key = keys_2[_e];\n        var obj = notice[key];\n        if (!obj) {\n            continue;\n        }\n        s = JSON.stringify(obj);\n        params[key] = s.length;\n    }\n    var err = new Error(\"airbrake: notice exceeds max length and can't be truncated\");\n    err.params = params;\n    throw err;\n}\nfunction scale(num, level) {\n    return num >> level || 1;\n}\nvar Truncator = /** @class */ (function () {\n    function Truncator(opts) {\n        this.maxStringLength = 1024;\n        this.maxObjectLength = MAX_OBJ_LENGTH;\n        this.maxArrayLength = MAX_OBJ_LENGTH;\n        this.maxDepth = 8;\n        this.keys = [];\n        this.keysBlocklist = [];\n        this.seen = [];\n        var level = opts.level || 0;\n        this.keysBlocklist = opts.keysBlocklist || [];\n        this.maxStringLength = scale(this.maxStringLength, level);\n        this.maxObjectLength = scale(this.maxObjectLength, level);\n        this.maxArrayLength = scale(this.maxArrayLength, level);\n        this.maxDepth = scale(this.maxDepth, level);\n    }\n    Truncator.prototype.truncate = function (value, key, depth) {\n        if (key === void 0) { key = ''; }\n        if (depth === void 0) { depth = 0; }\n        if (value === null || value === undefined) {\n            return value;\n        }\n        switch (typeof value) {\n            case 'boolean':\n            case 'number':\n            case 'function':\n                return value;\n            case 'string':\n                return this.truncateString(value);\n            case 'object':\n                break;\n            default:\n                return this.truncateString(String(value));\n        }\n        if (value instanceof String) {\n            return this.truncateString(value.toString());\n        }\n        if (value instanceof Boolean ||\n            value instanceof Number ||\n            value instanceof Date ||\n            value instanceof RegExp) {\n            return value;\n        }\n        if (value instanceof Error) {\n            return this.truncateString(value.toString());\n        }\n        if (this.seen.indexOf(value) >= 0) {\n            return \"[Circular \".concat(this.getPath(value), \"]\");\n        }\n        var type = objectType(value);\n        depth++;\n        if (depth > this.maxDepth) {\n            return \"[Truncated \".concat(type, \"]\");\n        }\n        this.keys.push(key);\n        this.seen.push(value);\n        switch (type) {\n            case 'Array':\n                return this.truncateArray(value, depth);\n            case 'Object':\n                return this.truncateObject(value, depth);\n            default:\n                var saved = this.maxDepth;\n                this.maxDepth = 0;\n                var obj = this.truncateObject(value, depth);\n                obj.__type = type;\n                this.maxDepth = saved;\n                return obj;\n        }\n    };\n    Truncator.prototype.getPath = function (value) {\n        var index = this.seen.indexOf(value);\n        var path = [this.keys[index]];\n        for (var i = index; i >= 0; i--) {\n            var sub = this.seen[i];\n            if (sub && getAttr(sub, path[0]) === value) {\n                value = sub;\n                path.unshift(this.keys[i]);\n            }\n        }\n        return '~' + path.join('.');\n    };\n    Truncator.prototype.truncateString = function (s) {\n        if (s.length > this.maxStringLength) {\n            return s.slice(0, this.maxStringLength) + '...';\n        }\n        return s;\n    };\n    Truncator.prototype.truncateArray = function (arr, depth) {\n        if (depth === void 0) { depth = 0; }\n        var length = 0;\n        var dst = [];\n        for (var i = 0; i < arr.length; i++) {\n            var el = arr[i];\n            dst.push(this.truncate(el, i.toString(), depth));\n            length++;\n            if (length >= this.maxArrayLength) {\n                break;\n            }\n        }\n        return dst;\n    };\n    Truncator.prototype.truncateObject = function (obj, depth) {\n        if (depth === void 0) { depth = 0; }\n        var length = 0;\n        var dst = {};\n        for (var key in obj) {\n            if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n                continue;\n            }\n            if (isBlocklisted(key, this.keysBlocklist)) {\n                dst[key] = FILTERED;\n                continue;\n            }\n            var value = getAttr(obj, key);\n            if (value === undefined || typeof value === 'function') {\n                continue;\n            }\n            dst[key] = this.truncate(value, key, depth);\n            length++;\n            if (length >= this.maxObjectLength) {\n                break;\n            }\n        }\n        return dst;\n    };\n    return Truncator;\n}());\nexport function truncate(value, opts) {\n    if (opts === void 0) { opts = {}; }\n    var t = new Truncator(opts);\n    return t.truncate(value);\n}\nfunction getAttr(obj, attr) {\n    // Ignore browser specific exception trying to read an attribute (#79).\n    try {\n        return obj[attr];\n    }\n    catch (_) {\n        return;\n    }\n}\nfunction objectType(obj) {\n    var s = Object.prototype.toString.apply(obj);\n    return s.slice('[object '.length, -1);\n}\nfunction isBlocklisted(key, keysBlocklist) {\n    for (var _i = 0, keysBlocklist_1 = keysBlocklist; _i < keysBlocklist_1.length; _i++) {\n        var v = keysBlocklist_1[_i];\n        if (v === key) {\n            return true;\n        }\n        if (v instanceof RegExp) {\n            if (key.match(v)) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n//# sourceMappingURL=jsonify_notice.js.map","var Span = /** @class */ (function () {\n    function Span(metric, name, startTime) {\n        this._dur = 0;\n        this._level = 0;\n        this._metric = metric;\n        this.name = name;\n        this.startTime = startTime || new Date();\n    }\n    Span.prototype.end = function (endTime) {\n        this.endTime = endTime ? endTime : new Date();\n        this._dur += this.endTime.getTime() - this.startTime.getTime();\n        this._metric._incGroup(this.name, this._dur);\n        this._metric = null;\n    };\n    Span.prototype._pause = function () {\n        if (this._paused()) {\n            return;\n        }\n        var now = new Date();\n        this._dur += now.getTime() - this.startTime.getTime();\n        this.startTime = null;\n    };\n    Span.prototype._resume = function () {\n        if (!this._paused()) {\n            return;\n        }\n        this.startTime = new Date();\n    };\n    Span.prototype._paused = function () {\n        return this.startTime == null;\n    };\n    return Span;\n}());\nexport { Span };\nvar BaseMetric = /** @class */ (function () {\n    function BaseMetric() {\n        this._spans = {};\n        this._groups = {};\n        this.startTime = new Date();\n    }\n    BaseMetric.prototype.end = function (endTime) {\n        if (!this.endTime) {\n            this.endTime = endTime || new Date();\n        }\n    };\n    BaseMetric.prototype.isRecording = function () {\n        return true;\n    };\n    BaseMetric.prototype.startSpan = function (name, startTime) {\n        var span = this._spans[name];\n        if (span) {\n            span._level++;\n        }\n        else {\n            span = new Span(this, name, startTime);\n            this._spans[name] = span;\n        }\n    };\n    BaseMetric.prototype.endSpan = function (name, endTime) {\n        var span = this._spans[name];\n        if (!span) {\n            console.error('airbrake: span=%s does not exist', name);\n            return;\n        }\n        if (span._level > 0) {\n            span._level--;\n        }\n        else {\n            span.end(endTime);\n            delete this._spans[span.name];\n        }\n    };\n    BaseMetric.prototype._incGroup = function (name, ms) {\n        this._groups[name] = (this._groups[name] || 0) + ms;\n    };\n    BaseMetric.prototype._duration = function () {\n        if (!this.endTime) {\n            this.endTime = new Date();\n        }\n        return this.endTime.getTime() - this.startTime.getTime();\n    };\n    return BaseMetric;\n}());\nexport { BaseMetric };\nvar NoopMetric = /** @class */ (function () {\n    function NoopMetric() {\n    }\n    NoopMetric.prototype.isRecording = function () {\n        return false;\n    };\n    NoopMetric.prototype.startSpan = function (_name, _startTime) { };\n    NoopMetric.prototype.endSpan = function (_name, _startTime) { };\n    NoopMetric.prototype._incGroup = function (_name, _ms) { };\n    return NoopMetric;\n}());\nexport { NoopMetric };\n//# sourceMappingURL=metrics.js.map","var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport { NoopMetric } from './metrics';\nvar Scope = /** @class */ (function () {\n    function Scope() {\n        this._noopMetric = new NoopMetric();\n        this._context = {};\n        this._historyMaxLen = 20;\n        this._history = [];\n    }\n    Scope.prototype.clone = function () {\n        var clone = new Scope();\n        clone._context = __assign({}, this._context);\n        clone._history = this._history.slice();\n        return clone;\n    };\n    Scope.prototype.setContext = function (context) {\n        this._context = __assign(__assign({}, this._context), context);\n    };\n    Scope.prototype.context = function () {\n        var ctx = __assign({}, this._context);\n        if (this._history.length > 0) {\n            ctx.history = this._history.slice();\n        }\n        return ctx;\n    };\n    Scope.prototype.pushHistory = function (state) {\n        if (this._isDupState(state)) {\n            if (this._lastRecord.num) {\n                this._lastRecord.num++;\n            }\n            else {\n                this._lastRecord.num = 2;\n            }\n            return;\n        }\n        if (!state.date) {\n            state.date = new Date();\n        }\n        this._history.push(state);\n        this._lastRecord = state;\n        if (this._history.length > this._historyMaxLen) {\n            this._history = this._history.slice(-this._historyMaxLen);\n        }\n    };\n    Scope.prototype._isDupState = function (state) {\n        if (!this._lastRecord) {\n            return false;\n        }\n        for (var key in state) {\n            if (!state.hasOwnProperty(key) || key === 'date') {\n                continue;\n            }\n            if (state[key] !== this._lastRecord[key]) {\n                return false;\n            }\n        }\n        return true;\n    };\n    Scope.prototype.routeMetric = function () {\n        return this._routeMetric || this._noopMetric;\n    };\n    Scope.prototype.setRouteMetric = function (metric) {\n        this._routeMetric = metric;\n    };\n    Scope.prototype.queueMetric = function () {\n        return this._queueMetric || this._noopMetric;\n    };\n    Scope.prototype.setQueueMetric = function (metric) {\n        this._queueMetric = metric;\n    };\n    return Scope;\n}());\nexport { Scope };\n//# sourceMappingURL=scope.js.map","(function(root, factory) {\n    'use strict';\n    // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n    /* istanbul ignore next */\n    if (typeof define === 'function' && define.amd) {\n        define('stackframe', [], factory);\n    } else if (typeof exports === 'object') {\n        module.exports = factory();\n    } else {\n        root.StackFrame = factory();\n    }\n}(this, function() {\n    'use strict';\n    function _isNumber(n) {\n        return !isNaN(parseFloat(n)) && isFinite(n);\n    }\n\n    function _capitalize(str) {\n        return str.charAt(0).toUpperCase() + str.substring(1);\n    }\n\n    function _getter(p) {\n        return function() {\n            return this[p];\n        };\n    }\n\n    var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n    var numericProps = ['columnNumber', 'lineNumber'];\n    var stringProps = ['fileName', 'functionName', 'source'];\n    var arrayProps = ['args'];\n    var objectProps = ['evalOrigin'];\n\n    var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n    function StackFrame(obj) {\n        if (!obj) return;\n        for (var i = 0; i < props.length; i++) {\n            if (obj[props[i]] !== undefined) {\n                this['set' + _capitalize(props[i])](obj[props[i]]);\n            }\n        }\n    }\n\n    StackFrame.prototype = {\n        getArgs: function() {\n            return this.args;\n        },\n        setArgs: function(v) {\n            if (Object.prototype.toString.call(v) !== '[object Array]') {\n                throw new TypeError('Args must be an Array');\n            }\n            this.args = v;\n        },\n\n        getEvalOrigin: function() {\n            return this.evalOrigin;\n        },\n        setEvalOrigin: function(v) {\n            if (v instanceof StackFrame) {\n                this.evalOrigin = v;\n            } else if (v instanceof Object) {\n                this.evalOrigin = new StackFrame(v);\n            } else {\n                throw new TypeError('Eval Origin must be an Object or StackFrame');\n            }\n        },\n\n        toString: function() {\n            var fileName = this.getFileName() || '';\n            var lineNumber = this.getLineNumber() || '';\n            var columnNumber = this.getColumnNumber() || '';\n            var functionName = this.getFunctionName() || '';\n            if (this.getIsEval()) {\n                if (fileName) {\n                    return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n                }\n                return '[eval]:' + lineNumber + ':' + columnNumber;\n            }\n            if (functionName) {\n                return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n            }\n            return fileName + ':' + lineNumber + ':' + columnNumber;\n        }\n    };\n\n    StackFrame.fromString = function StackFrame$$fromString(str) {\n        var argsStartIndex = str.indexOf('(');\n        var argsEndIndex = str.lastIndexOf(')');\n\n        var functionName = str.substring(0, argsStartIndex);\n        var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n        var locationString = str.substring(argsEndIndex + 1);\n\n        if (locationString.indexOf('@') === 0) {\n            var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n            var fileName = parts[1];\n            var lineNumber = parts[2];\n            var columnNumber = parts[3];\n        }\n\n        return new StackFrame({\n            functionName: functionName,\n            args: args || undefined,\n            fileName: fileName,\n            lineNumber: lineNumber || undefined,\n            columnNumber: columnNumber || undefined\n        });\n    };\n\n    for (var i = 0; i < booleanProps.length; i++) {\n        StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n        StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n            return function(v) {\n                this[p] = Boolean(v);\n            };\n        })(booleanProps[i]);\n    }\n\n    for (var j = 0; j < numericProps.length; j++) {\n        StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n        StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n            return function(v) {\n                if (!_isNumber(v)) {\n                    throw new TypeError(p + ' must be a Number');\n                }\n                this[p] = Number(v);\n            };\n        })(numericProps[j]);\n    }\n\n    for (var k = 0; k < stringProps.length; k++) {\n        StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n        StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n            return function(v) {\n                this[p] = String(v);\n            };\n        })(stringProps[k]);\n    }\n\n    return StackFrame;\n}));\n","(function(root, factory) {\n    'use strict';\n    // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n    /* istanbul ignore next */\n    if (typeof define === 'function' && define.amd) {\n        define('error-stack-parser', ['stackframe'], factory);\n    } else if (typeof exports === 'object') {\n        module.exports = factory(require('stackframe'));\n    } else {\n        root.ErrorStackParser = factory(root.StackFrame);\n    }\n}(this, function ErrorStackParser(StackFrame) {\n    'use strict';\n\n    var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n    var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n    var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n    return {\n        /**\n         * Given an Error object, extract the most information from it.\n         *\n         * @param {Error} error object\n         * @return {Array} of StackFrames\n         */\n        parse: function ErrorStackParser$$parse(error) {\n            if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n                return this.parseOpera(error);\n            } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n                return this.parseV8OrIE(error);\n            } else if (error.stack) {\n                return this.parseFFOrSafari(error);\n            } else {\n                throw new Error('Cannot parse given Error object');\n            }\n        },\n\n        // Separate line and column numbers from a string of the form: (URI:Line:Column)\n        extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n            // Fail-fast but return locations like \"(native)\"\n            if (urlLike.indexOf(':') === -1) {\n                return [urlLike];\n            }\n\n            var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n            var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n            return [parts[1], parts[2] || undefined, parts[3] || undefined];\n        },\n\n        parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n            var filtered = error.stack.split('\\n').filter(function(line) {\n                return !!line.match(CHROME_IE_STACK_REGEXP);\n            }, this);\n\n            return filtered.map(function(line) {\n                if (line.indexOf('(eval ') > -1) {\n                    // Throw away eval information until we implement stacktrace.js/stackframe#8\n                    line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n                }\n                var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n                // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n                // case it has spaces in it, as the string is split on \\s+ later on\n                var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n                // remove the parenthesized location from the line, if it was matched\n                sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n                // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n                // because this line doesn't have function name\n                var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n                var functionName = location && sanitizedLine || undefined;\n                var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n                return new StackFrame({\n                    functionName: functionName,\n                    fileName: fileName,\n                    lineNumber: locationParts[1],\n                    columnNumber: locationParts[2],\n                    source: line\n                });\n            }, this);\n        },\n\n        parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n            var filtered = error.stack.split('\\n').filter(function(line) {\n                return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n            }, this);\n\n            return filtered.map(function(line) {\n                // Throw away eval information until we implement stacktrace.js/stackframe#8\n                if (line.indexOf(' > eval') > -1) {\n                    line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n                }\n\n                if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n                    // Safari eval frames only have function names and nothing else\n                    return new StackFrame({\n                        functionName: line\n                    });\n                } else {\n                    var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n                    var matches = line.match(functionNameRegex);\n                    var functionName = matches && matches[1] ? matches[1] : undefined;\n                    var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n                    return new StackFrame({\n                        functionName: functionName,\n                        fileName: locationParts[0],\n                        lineNumber: locationParts[1],\n                        columnNumber: locationParts[2],\n                        source: line\n                    });\n                }\n            }, this);\n        },\n\n        parseOpera: function ErrorStackParser$$parseOpera(e) {\n            if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n                e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n                return this.parseOpera9(e);\n            } else if (!e.stack) {\n                return this.parseOpera10(e);\n            } else {\n                return this.parseOpera11(e);\n            }\n        },\n\n        parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n            var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n            var lines = e.message.split('\\n');\n            var result = [];\n\n            for (var i = 2, len = lines.length; i < len; i += 2) {\n                var match = lineRE.exec(lines[i]);\n                if (match) {\n                    result.push(new StackFrame({\n                        fileName: match[2],\n                        lineNumber: match[1],\n                        source: lines[i]\n                    }));\n                }\n            }\n\n            return result;\n        },\n\n        parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n            var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n            var lines = e.stacktrace.split('\\n');\n            var result = [];\n\n            for (var i = 0, len = lines.length; i < len; i += 2) {\n                var match = lineRE.exec(lines[i]);\n                if (match) {\n                    result.push(\n                        new StackFrame({\n                            functionName: match[3] || undefined,\n                            fileName: match[2],\n                            lineNumber: match[1],\n                            source: lines[i]\n                        })\n                    );\n                }\n            }\n\n            return result;\n        },\n\n        // Opera 10.65+ Error.stack very similar to FF/Safari\n        parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n            var filtered = error.stack.split('\\n').filter(function(line) {\n                return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n            }, this);\n\n            return filtered.map(function(line) {\n                var tokens = line.split('@');\n                var locationParts = this.extractLocation(tokens.pop());\n                var functionCall = (tokens.shift() || '');\n                var functionName = functionCall\n                    .replace(/<anonymous function(: (\\w+))?>/, '$2')\n                    .replace(/\\([^)]*\\)/g, '') || undefined;\n                var argsRaw;\n                if (functionCall.match(/\\(([^)]*)\\)/)) {\n                    argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n                }\n                var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n                    undefined : argsRaw.split(',');\n\n                return new StackFrame({\n                    functionName: functionName,\n                    args: args,\n                    fileName: locationParts[0],\n                    lineNumber: locationParts[1],\n                    columnNumber: locationParts[2],\n                    source: line\n                });\n            }, this);\n        }\n    };\n}));\n","import ErrorStackParser from 'error-stack-parser';\nvar hasConsole = typeof console === 'object' && console.warn;\nfunction parse(err) {\n    try {\n        return ErrorStackParser.parse(err);\n    }\n    catch (parseErr) {\n        if (hasConsole && err.stack) {\n            console.warn('ErrorStackParser:', parseErr.toString(), err.stack);\n        }\n    }\n    if (err.fileName) {\n        return [err];\n    }\n    return [];\n}\nexport function espProcessor(err) {\n    var backtrace = [];\n    if (err.noStack) {\n        backtrace.push({\n            function: err.functionName || '',\n            file: err.fileName || '',\n            line: err.lineNumber || 0,\n            column: err.columnNumber || 0,\n        });\n    }\n    else {\n        var frames_2 = parse(err);\n        if (frames_2.length === 0) {\n            try {\n                throw new Error('fake');\n            }\n            catch (fakeErr) {\n                frames_2 = parse(fakeErr);\n                frames_2.shift();\n                frames_2.shift();\n            }\n        }\n        for (var _i = 0, frames_1 = frames_2; _i < frames_1.length; _i++) {\n            var frame = frames_1[_i];\n            backtrace.push({\n                function: frame.functionName || '',\n                file: frame.fileName || '',\n                line: frame.lineNumber || 0,\n                column: frame.columnNumber || 0,\n            });\n        }\n    }\n    var type = err.name ? err.name : '';\n    var msg = err.message ? String(err.message) : String(err);\n    return {\n        type: type,\n        message: msg,\n        backtrace: backtrace,\n    };\n}\n//# sourceMappingURL=esp.js.map","var re = new RegExp([\n    '^',\n    '\\\\[(\\\\$.+)\\\\]',\n    '\\\\s',\n    '([\\\\s\\\\S]+)',\n    '$',\n].join(''));\nexport function angularMessageFilter(notice) {\n    var err = notice.errors[0];\n    if (err.type !== '' && err.type !== 'Error') {\n        return notice;\n    }\n    var m = err.message.match(re);\n    if (m !== null) {\n        err.type = m[1];\n        err.message = m[2];\n    }\n    return notice;\n}\n//# sourceMappingURL=angular_message.js.map","export function makeDebounceFilter() {\n    var lastNoticeJSON;\n    var timeout;\n    return function (notice) {\n        var s = JSON.stringify(notice.errors);\n        if (s === lastNoticeJSON) {\n            return null;\n        }\n        if (timeout) {\n            clearTimeout(timeout);\n        }\n        lastNoticeJSON = s;\n        timeout = setTimeout(function () {\n            lastNoticeJSON = '';\n        }, 1000);\n        return notice;\n    };\n}\n//# sourceMappingURL=debounce.js.map","var IGNORED_MESSAGES = [\n    'Script error',\n    'Script error.',\n    'InvalidAccessError',\n];\nexport function ignoreNoiseFilter(notice) {\n    var err = notice.errors[0];\n    if (err.type === '' && IGNORED_MESSAGES.indexOf(err.message) !== -1) {\n        return null;\n    }\n    if (err.backtrace && err.backtrace.length > 0) {\n        var frame = err.backtrace[0];\n        if (frame.file === '<anonymous>') {\n            return null;\n        }\n    }\n    return notice;\n}\n//# sourceMappingURL=ignore_noise.js.map","var re = new RegExp([\n    '^',\n    'Uncaught\\\\s',\n    '(.+?)',\n    ':\\\\s',\n    '(.+)',\n    '$',\n].join(''));\nexport function uncaughtMessageFilter(notice) {\n    var err = notice.errors[0];\n    if (err.type !== '' && err.type !== 'Error') {\n        return notice;\n    }\n    var m = err.message.match(re);\n    if (m !== null) {\n        err.type = m[1];\n        err.message = m[2];\n    }\n    return notice;\n}\n//# sourceMappingURL=uncaught_message.js.map","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n  var support = {\n    searchParams: 'URLSearchParams' in self,\n    iterable: 'Symbol' in self && 'iterator' in Symbol,\n    blob:\n      'FileReader' in self &&\n      'Blob' in self &&\n      (function() {\n        try {\n          new Blob();\n          return true\n        } catch (e) {\n          return false\n        }\n      })(),\n    formData: 'FormData' in self,\n    arrayBuffer: 'ArrayBuffer' in self\n  };\n\n  function isDataView(obj) {\n    return obj && DataView.prototype.isPrototypeOf(obj)\n  }\n\n  if (support.arrayBuffer) {\n    var viewClasses = [\n      '[object Int8Array]',\n      '[object Uint8Array]',\n      '[object Uint8ClampedArray]',\n      '[object Int16Array]',\n      '[object Uint16Array]',\n      '[object Int32Array]',\n      '[object Uint32Array]',\n      '[object Float32Array]',\n      '[object Float64Array]'\n    ];\n\n    var isArrayBufferView =\n      ArrayBuffer.isView ||\n      function(obj) {\n        return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n      };\n  }\n\n  function normalizeName(name) {\n    if (typeof name !== 'string') {\n      name = String(name);\n    }\n    if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n      throw new TypeError('Invalid character in header field name')\n    }\n    return name.toLowerCase()\n  }\n\n  function normalizeValue(value) {\n    if (typeof value !== 'string') {\n      value = String(value);\n    }\n    return value\n  }\n\n  // Build a destructive iterator for the value list\n  function iteratorFor(items) {\n    var iterator = {\n      next: function() {\n        var value = items.shift();\n        return {done: value === undefined, value: value}\n      }\n    };\n\n    if (support.iterable) {\n      iterator[Symbol.iterator] = function() {\n        return iterator\n      };\n    }\n\n    return iterator\n  }\n\n  function Headers(headers) {\n    this.map = {};\n\n    if (headers instanceof Headers) {\n      headers.forEach(function(value, name) {\n        this.append(name, value);\n      }, this);\n    } else if (Array.isArray(headers)) {\n      headers.forEach(function(header) {\n        this.append(header[0], header[1]);\n      }, this);\n    } else if (headers) {\n      Object.getOwnPropertyNames(headers).forEach(function(name) {\n        this.append(name, headers[name]);\n      }, this);\n    }\n  }\n\n  Headers.prototype.append = function(name, value) {\n    name = normalizeName(name);\n    value = normalizeValue(value);\n    var oldValue = this.map[name];\n    this.map[name] = oldValue ? oldValue + ', ' + value : value;\n  };\n\n  Headers.prototype['delete'] = function(name) {\n    delete this.map[normalizeName(name)];\n  };\n\n  Headers.prototype.get = function(name) {\n    name = normalizeName(name);\n    return this.has(name) ? this.map[name] : null\n  };\n\n  Headers.prototype.has = function(name) {\n    return this.map.hasOwnProperty(normalizeName(name))\n  };\n\n  Headers.prototype.set = function(name, value) {\n    this.map[normalizeName(name)] = normalizeValue(value);\n  };\n\n  Headers.prototype.forEach = function(callback, thisArg) {\n    for (var name in this.map) {\n      if (this.map.hasOwnProperty(name)) {\n        callback.call(thisArg, this.map[name], name, this);\n      }\n    }\n  };\n\n  Headers.prototype.keys = function() {\n    var items = [];\n    this.forEach(function(value, name) {\n      items.push(name);\n    });\n    return iteratorFor(items)\n  };\n\n  Headers.prototype.values = function() {\n    var items = [];\n    this.forEach(function(value) {\n      items.push(value);\n    });\n    return iteratorFor(items)\n  };\n\n  Headers.prototype.entries = function() {\n    var items = [];\n    this.forEach(function(value, name) {\n      items.push([name, value]);\n    });\n    return iteratorFor(items)\n  };\n\n  if (support.iterable) {\n    Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n  }\n\n  function consumed(body) {\n    if (body.bodyUsed) {\n      return Promise.reject(new TypeError('Already read'))\n    }\n    body.bodyUsed = true;\n  }\n\n  function fileReaderReady(reader) {\n    return new Promise(function(resolve, reject) {\n      reader.onload = function() {\n        resolve(reader.result);\n      };\n      reader.onerror = function() {\n        reject(reader.error);\n      };\n    })\n  }\n\n  function readBlobAsArrayBuffer(blob) {\n    var reader = new FileReader();\n    var promise = fileReaderReady(reader);\n    reader.readAsArrayBuffer(blob);\n    return promise\n  }\n\n  function readBlobAsText(blob) {\n    var reader = new FileReader();\n    var promise = fileReaderReady(reader);\n    reader.readAsText(blob);\n    return promise\n  }\n\n  function readArrayBufferAsText(buf) {\n    var view = new Uint8Array(buf);\n    var chars = new Array(view.length);\n\n    for (var i = 0; i < view.length; i++) {\n      chars[i] = String.fromCharCode(view[i]);\n    }\n    return chars.join('')\n  }\n\n  function bufferClone(buf) {\n    if (buf.slice) {\n      return buf.slice(0)\n    } else {\n      var view = new Uint8Array(buf.byteLength);\n      view.set(new Uint8Array(buf));\n      return view.buffer\n    }\n  }\n\n  function Body() {\n    this.bodyUsed = false;\n\n    this._initBody = function(body) {\n      this._bodyInit = body;\n      if (!body) {\n        this._bodyText = '';\n      } else if (typeof body === 'string') {\n        this._bodyText = body;\n      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n        this._bodyBlob = body;\n      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n        this._bodyFormData = body;\n      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n        this._bodyText = body.toString();\n      } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n        this._bodyArrayBuffer = bufferClone(body.buffer);\n        // IE 10-11 can't handle a DataView body.\n        this._bodyInit = new Blob([this._bodyArrayBuffer]);\n      } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n        this._bodyArrayBuffer = bufferClone(body);\n      } else {\n        this._bodyText = body = Object.prototype.toString.call(body);\n      }\n\n      if (!this.headers.get('content-type')) {\n        if (typeof body === 'string') {\n          this.headers.set('content-type', 'text/plain;charset=UTF-8');\n        } else if (this._bodyBlob && this._bodyBlob.type) {\n          this.headers.set('content-type', this._bodyBlob.type);\n        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n        }\n      }\n    };\n\n    if (support.blob) {\n      this.blob = function() {\n        var rejected = consumed(this);\n        if (rejected) {\n          return rejected\n        }\n\n        if (this._bodyBlob) {\n          return Promise.resolve(this._bodyBlob)\n        } else if (this._bodyArrayBuffer) {\n          return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n        } else if (this._bodyFormData) {\n          throw new Error('could not read FormData body as blob')\n        } else {\n          return Promise.resolve(new Blob([this._bodyText]))\n        }\n      };\n\n      this.arrayBuffer = function() {\n        if (this._bodyArrayBuffer) {\n          return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n        } else {\n          return this.blob().then(readBlobAsArrayBuffer)\n        }\n      };\n    }\n\n    this.text = function() {\n      var rejected = consumed(this);\n      if (rejected) {\n        return rejected\n      }\n\n      if (this._bodyBlob) {\n        return readBlobAsText(this._bodyBlob)\n      } else if (this._bodyArrayBuffer) {\n        return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n      } else if (this._bodyFormData) {\n        throw new Error('could not read FormData body as text')\n      } else {\n        return Promise.resolve(this._bodyText)\n      }\n    };\n\n    if (support.formData) {\n      this.formData = function() {\n        return this.text().then(decode)\n      };\n    }\n\n    this.json = function() {\n      return this.text().then(JSON.parse)\n    };\n\n    return this\n  }\n\n  // HTTP methods whose capitalization should be normalized\n  var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n  function normalizeMethod(method) {\n    var upcased = method.toUpperCase();\n    return methods.indexOf(upcased) > -1 ? upcased : method\n  }\n\n  function Request(input, options) {\n    options = options || {};\n    var body = options.body;\n\n    if (input instanceof Request) {\n      if (input.bodyUsed) {\n        throw new TypeError('Already read')\n      }\n      this.url = input.url;\n      this.credentials = input.credentials;\n      if (!options.headers) {\n        this.headers = new Headers(input.headers);\n      }\n      this.method = input.method;\n      this.mode = input.mode;\n      this.signal = input.signal;\n      if (!body && input._bodyInit != null) {\n        body = input._bodyInit;\n        input.bodyUsed = true;\n      }\n    } else {\n      this.url = String(input);\n    }\n\n    this.credentials = options.credentials || this.credentials || 'same-origin';\n    if (options.headers || !this.headers) {\n      this.headers = new Headers(options.headers);\n    }\n    this.method = normalizeMethod(options.method || this.method || 'GET');\n    this.mode = options.mode || this.mode || null;\n    this.signal = options.signal || this.signal;\n    this.referrer = null;\n\n    if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n      throw new TypeError('Body not allowed for GET or HEAD requests')\n    }\n    this._initBody(body);\n  }\n\n  Request.prototype.clone = function() {\n    return new Request(this, {body: this._bodyInit})\n  };\n\n  function decode(body) {\n    var form = new FormData();\n    body\n      .trim()\n      .split('&')\n      .forEach(function(bytes) {\n        if (bytes) {\n          var split = bytes.split('=');\n          var name = split.shift().replace(/\\+/g, ' ');\n          var value = split.join('=').replace(/\\+/g, ' ');\n          form.append(decodeURIComponent(name), decodeURIComponent(value));\n        }\n      });\n    return form\n  }\n\n  function parseHeaders(rawHeaders) {\n    var headers = new Headers();\n    // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n    // https://tools.ietf.org/html/rfc7230#section-3.2\n    var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n    preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n      var parts = line.split(':');\n      var key = parts.shift().trim();\n      if (key) {\n        var value = parts.join(':').trim();\n        headers.append(key, value);\n      }\n    });\n    return headers\n  }\n\n  Body.call(Request.prototype);\n\n  function Response(bodyInit, options) {\n    if (!options) {\n      options = {};\n    }\n\n    this.type = 'default';\n    this.status = options.status === undefined ? 200 : options.status;\n    this.ok = this.status >= 200 && this.status < 300;\n    this.statusText = 'statusText' in options ? options.statusText : 'OK';\n    this.headers = new Headers(options.headers);\n    this.url = options.url || '';\n    this._initBody(bodyInit);\n  }\n\n  Body.call(Response.prototype);\n\n  Response.prototype.clone = function() {\n    return new Response(this._bodyInit, {\n      status: this.status,\n      statusText: this.statusText,\n      headers: new Headers(this.headers),\n      url: this.url\n    })\n  };\n\n  Response.error = function() {\n    var response = new Response(null, {status: 0, statusText: ''});\n    response.type = 'error';\n    return response\n  };\n\n  var redirectStatuses = [301, 302, 303, 307, 308];\n\n  Response.redirect = function(url, status) {\n    if (redirectStatuses.indexOf(status) === -1) {\n      throw new RangeError('Invalid status code')\n    }\n\n    return new Response(null, {status: status, headers: {location: url}})\n  };\n\n  exports.DOMException = self.DOMException;\n  try {\n    new exports.DOMException();\n  } catch (err) {\n    exports.DOMException = function(message, name) {\n      this.message = message;\n      this.name = name;\n      var error = Error(message);\n      this.stack = error.stack;\n    };\n    exports.DOMException.prototype = Object.create(Error.prototype);\n    exports.DOMException.prototype.constructor = exports.DOMException;\n  }\n\n  function fetch(input, init) {\n    return new Promise(function(resolve, reject) {\n      var request = new Request(input, init);\n\n      if (request.signal && request.signal.aborted) {\n        return reject(new exports.DOMException('Aborted', 'AbortError'))\n      }\n\n      var xhr = new XMLHttpRequest();\n\n      function abortXhr() {\n        xhr.abort();\n      }\n\n      xhr.onload = function() {\n        var options = {\n          status: xhr.status,\n          statusText: xhr.statusText,\n          headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n        };\n        options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n        var body = 'response' in xhr ? xhr.response : xhr.responseText;\n        resolve(new Response(body, options));\n      };\n\n      xhr.onerror = function() {\n        reject(new TypeError('Network request failed'));\n      };\n\n      xhr.ontimeout = function() {\n        reject(new TypeError('Network request failed'));\n      };\n\n      xhr.onabort = function() {\n        reject(new exports.DOMException('Aborted', 'AbortError'));\n      };\n\n      xhr.open(request.method, request.url, true);\n\n      if (request.credentials === 'include') {\n        xhr.withCredentials = true;\n      } else if (request.credentials === 'omit') {\n        xhr.withCredentials = false;\n      }\n\n      if ('responseType' in xhr && support.blob) {\n        xhr.responseType = 'blob';\n      }\n\n      request.headers.forEach(function(value, name) {\n        xhr.setRequestHeader(name, value);\n      });\n\n      if (request.signal) {\n        request.signal.addEventListener('abort', abortXhr);\n\n        xhr.onreadystatechange = function() {\n          // DONE (success or failure)\n          if (xhr.readyState === 4) {\n            request.signal.removeEventListener('abort', abortXhr);\n          }\n        };\n      }\n\n      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n    })\n  }\n\n  fetch.polyfill = true;\n\n  if (!self.fetch) {\n    self.fetch = fetch;\n    self.Headers = Headers;\n    self.Request = Request;\n    self.Response = Response;\n  }\n\n  exports.Headers = Headers;\n  exports.Request = Request;\n  exports.Response = Response;\n  exports.fetch = fetch;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n  return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","export var errors = {\n    unauthorized: new Error('airbrake: unauthorized: project id or key are wrong'),\n    ipRateLimited: new Error('airbrake: IP is rate limited'),\n};\n//# sourceMappingURL=api.js.map","import fetch from 'cross-fetch';\nimport Promise from 'promise-polyfill';\nimport { errors } from './api';\nvar rateLimitReset = 0;\nexport function request(req) {\n    var utime = Date.now() / 1000;\n    if (utime < rateLimitReset) {\n        return Promise.reject(errors.ipRateLimited);\n    }\n    var opt = {\n        method: req.method,\n        body: req.body,\n        headers: req.headers,\n    };\n    return fetch(req.url, opt).then(function (resp) {\n        if (resp.status === 401) {\n            throw errors.unauthorized;\n        }\n        if (resp.status === 429) {\n            var s = resp.headers.get('X-RateLimit-Delay');\n            if (!s) {\n                throw errors.ipRateLimited;\n            }\n            var n = parseInt(s, 10);\n            if (n > 0) {\n                rateLimitReset = Date.now() / 1000 + n;\n            }\n            throw errors.ipRateLimited;\n        }\n        if (resp.status === 204) {\n            return { json: null };\n        }\n        if (resp.status === 404) {\n            throw new Error('404 Not Found');\n        }\n        if (resp.status >= 200 && resp.status < 300) {\n            return resp.json().then(function (json) {\n                return { json: json };\n            });\n        }\n        if (resp.status >= 400 && resp.status < 500) {\n            return resp.json().then(function (json) {\n                var err = new Error(json.message);\n                throw err;\n            });\n        }\n        return resp.text().then(function (body) {\n            var err = new Error(\"airbrake: fetch: unexpected response: code=\".concat(resp.status, \" body='\").concat(body, \"'\"));\n            throw err;\n        });\n    });\n}\n//# sourceMappingURL=fetch.js.map","import Promise from 'promise-polyfill';\nimport { errors } from './api';\nexport function makeRequester(api) {\n    return function (req) {\n        return request(req, api);\n    };\n}\nvar rateLimitReset = 0;\nfunction request(req, api) {\n    var utime = Date.now() / 1000;\n    if (utime < rateLimitReset) {\n        return Promise.reject(errors.ipRateLimited);\n    }\n    return new Promise(function (resolve, reject) {\n        api({\n            url: req.url,\n            method: req.method,\n            body: req.body,\n            headers: {\n                'content-type': 'application/json',\n            },\n            timeout: req.timeout,\n        }, function (error, resp, body) {\n            if (error) {\n                reject(error);\n                return;\n            }\n            if (!resp.statusCode) {\n                error = new Error(\"airbrake: request: response statusCode is \".concat(resp.statusCode));\n                reject(error);\n                return;\n            }\n            if (resp.statusCode === 401) {\n                reject(errors.unauthorized);\n                return;\n            }\n            if (resp.statusCode === 429) {\n                reject(errors.ipRateLimited);\n                var h = resp.headers['x-ratelimit-delay'];\n                if (!h) {\n                    return;\n                }\n                var s = void 0;\n                if (typeof h === 'string') {\n                    s = h;\n                }\n                else if (h instanceof Array) {\n                    s = h[0];\n                }\n                else {\n                    return;\n                }\n                var n = parseInt(s, 10);\n                if (n > 0) {\n                    rateLimitReset = Date.now() / 1000 + n;\n                }\n                return;\n            }\n            if (resp.statusCode === 204) {\n                resolve({ json: null });\n                return;\n            }\n            if (resp.statusCode >= 200 && resp.statusCode < 300) {\n                var json = void 0;\n                try {\n                    json = JSON.parse(body);\n                }\n                catch (err) {\n                    reject(err);\n                    return;\n                }\n                resolve(json);\n                return;\n            }\n            if (resp.statusCode >= 400 && resp.statusCode < 500) {\n                var json = void 0;\n                try {\n                    json = JSON.parse(body);\n                }\n                catch (err) {\n                    reject(err);\n                    return;\n                }\n                error = new Error(json.message);\n                reject(error);\n                return;\n            }\n            body = body.trim();\n            error = new Error(\"airbrake: node: unexpected response: code=\".concat(resp.statusCode, \" body='\").concat(body, \"'\"));\n            reject(error);\n        });\n    });\n}\n//# sourceMappingURL=node.js.map","import { request as fetchRequest } from './fetch';\nimport { makeRequester as makeNodeRequester } from './node';\nexport function makeRequester(opts) {\n    if (opts.request) {\n        return makeNodeRequester(opts.request);\n    }\n    return fetchRequest;\n}\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar tdigest;\nexport var hasTdigest = false;\ntry {\n    tdigest = require('tdigest');\n    hasTdigest = true;\n}\ncatch (err) { }\nvar TDigestStat = /** @class */ (function () {\n    function TDigestStat() {\n        this.count = 0;\n        this.sum = 0;\n        this.sumsq = 0;\n        this._td = new tdigest.Digest();\n    }\n    TDigestStat.prototype.add = function (ms) {\n        if (ms === 0) {\n            ms = 0.00001;\n        }\n        this.count += 1;\n        this.sum += ms;\n        this.sumsq += ms * ms;\n        if (this._td) {\n            this._td.push(ms);\n        }\n    };\n    TDigestStat.prototype.toJSON = function () {\n        return {\n            count: this.count,\n            sum: this.sum,\n            sumsq: this.sumsq,\n            tdigestCentroids: tdigestCentroids(this._td),\n        };\n    };\n    return TDigestStat;\n}());\nexport { TDigestStat };\nvar TDigestStatGroups = /** @class */ (function (_super) {\n    __extends(TDigestStatGroups, _super);\n    function TDigestStatGroups() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.groups = {};\n        return _this;\n    }\n    TDigestStatGroups.prototype.addGroups = function (totalMs, groups) {\n        this.add(totalMs);\n        for (var name_1 in groups) {\n            if (groups.hasOwnProperty(name_1)) {\n                this.addGroup(name_1, groups[name_1]);\n            }\n        }\n    };\n    TDigestStatGroups.prototype.addGroup = function (name, ms) {\n        var stat = this.groups[name];\n        if (!stat) {\n            stat = new TDigestStat();\n            this.groups[name] = stat;\n        }\n        stat.add(ms);\n    };\n    TDigestStatGroups.prototype.toJSON = function () {\n        return {\n            count: this.count,\n            sum: this.sum,\n            sumsq: this.sumsq,\n            tdigestCentroids: tdigestCentroids(this._td),\n            groups: this.groups,\n        };\n    };\n    return TDigestStatGroups;\n}(TDigestStat));\nexport { TDigestStatGroups };\nfunction tdigestCentroids(td) {\n    var means = [];\n    var counts = [];\n    td.centroids.each(function (c) {\n        means.push(c.mean);\n        counts.push(c.n);\n    });\n    return {\n        mean: means,\n        count: counts,\n    };\n}\n//# sourceMappingURL=tdshared.js.map","var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport { makeRequester } from './http_req';\nimport { hasTdigest, TDigestStat } from './tdshared';\nvar FLUSH_INTERVAL = 15000; // 15 seconds\nvar QueryInfo = /** @class */ (function () {\n    function QueryInfo(query) {\n        if (query === void 0) { query = ''; }\n        this.method = '';\n        this.route = '';\n        this.query = '';\n        this.func = '';\n        this.file = '';\n        this.line = 0;\n        this.startTime = new Date();\n        this.query = query;\n    }\n    QueryInfo.prototype._duration = function () {\n        if (!this.endTime) {\n            this.endTime = new Date();\n        }\n        return this.endTime.getTime() - this.startTime.getTime();\n    };\n    return QueryInfo;\n}());\nexport { QueryInfo };\nvar QueriesStats = /** @class */ (function () {\n    function QueriesStats(opt) {\n        this._m = {};\n        this._opt = opt;\n        this._url = \"\".concat(opt.host, \"/api/v5/projects/\").concat(opt.projectId, \"/queries-stats?key=\").concat(opt.projectKey);\n        this._requester = makeRequester(opt);\n    }\n    QueriesStats.prototype.start = function (query) {\n        if (query === void 0) { query = ''; }\n        return new QueryInfo(query);\n    };\n    QueriesStats.prototype.notify = function (q) {\n        var _this = this;\n        if (!hasTdigest) {\n            return;\n        }\n        if (!this._opt.performanceStats) {\n            return;\n        }\n        if (!this._opt.queryStats) {\n            return;\n        }\n        var ms = q._duration();\n        var minute = 60 * 1000;\n        var startTime = new Date(Math.floor(q.startTime.getTime() / minute) * minute);\n        var key = {\n            method: q.method,\n            route: q.route,\n            query: q.query,\n            func: q.func,\n            file: q.file,\n            line: q.line,\n            time: startTime,\n        };\n        var keyStr = JSON.stringify(key);\n        var stat = this._m[keyStr];\n        if (!stat) {\n            stat = new TDigestStat();\n            this._m[keyStr] = stat;\n        }\n        stat.add(ms);\n        if (this._timer) {\n            return;\n        }\n        this._timer = setTimeout(function () {\n            _this._flush();\n        }, FLUSH_INTERVAL);\n    };\n    QueriesStats.prototype._flush = function () {\n        var queries = [];\n        for (var keyStr in this._m) {\n            if (!this._m.hasOwnProperty(keyStr)) {\n                continue;\n            }\n            var key = JSON.parse(keyStr);\n            var v = __assign(__assign({}, key), this._m[keyStr].toJSON());\n            queries.push(v);\n        }\n        this._m = {};\n        this._timer = null;\n        var outJSON = JSON.stringify({\n            environment: this._opt.environment,\n            queries: queries,\n        });\n        var req = {\n            method: 'POST',\n            url: this._url,\n            body: outJSON,\n        };\n        this._requester(req)\n            .then(function (_resp) {\n            // nothing\n        })\n            .catch(function (err) {\n            if (console.error) {\n                console.error('can not report queries stats', err);\n            }\n        });\n    };\n    return QueriesStats;\n}());\nexport { QueriesStats };\n//# sourceMappingURL=queries.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport { makeRequester } from './http_req';\nimport { BaseMetric } from './metrics';\nimport { hasTdigest, TDigestStatGroups } from './tdshared';\nvar FLUSH_INTERVAL = 15000; // 15 seconds\nvar QueueMetric = /** @class */ (function (_super) {\n    __extends(QueueMetric, _super);\n    function QueueMetric(queue) {\n        var _this = _super.call(this) || this;\n        _this.queue = queue;\n        _this.startTime = new Date();\n        return _this;\n    }\n    return QueueMetric;\n}(BaseMetric));\nexport { QueueMetric };\nvar QueuesStats = /** @class */ (function () {\n    function QueuesStats(opt) {\n        this._m = {};\n        this._opt = opt;\n        this._url = \"\".concat(opt.host, \"/api/v5/projects/\").concat(opt.projectId, \"/queues-stats?key=\").concat(opt.projectKey);\n        this._requester = makeRequester(opt);\n    }\n    QueuesStats.prototype.notify = function (q) {\n        var _this = this;\n        if (!hasTdigest) {\n            return;\n        }\n        if (!this._opt.performanceStats) {\n            return;\n        }\n        if (!this._opt.queueStats) {\n            return;\n        }\n        var ms = q._duration();\n        if (ms === 0) {\n            ms = 0.00001;\n        }\n        var minute = 60 * 1000;\n        var startTime = new Date(Math.floor(q.startTime.getTime() / minute) * minute);\n        var key = {\n            queue: q.queue,\n            time: startTime,\n        };\n        var keyStr = JSON.stringify(key);\n        var stat = this._m[keyStr];\n        if (!stat) {\n            stat = new TDigestStatGroups();\n            this._m[keyStr] = stat;\n        }\n        stat.addGroups(ms, q._groups);\n        if (this._timer) {\n            return;\n        }\n        this._timer = setTimeout(function () {\n            _this._flush();\n        }, FLUSH_INTERVAL);\n    };\n    QueuesStats.prototype._flush = function () {\n        var queues = [];\n        for (var keyStr in this._m) {\n            if (!this._m.hasOwnProperty(keyStr)) {\n                continue;\n            }\n            var key = JSON.parse(keyStr);\n            var v = __assign(__assign({}, key), this._m[keyStr].toJSON());\n            queues.push(v);\n        }\n        this._m = {};\n        this._timer = null;\n        var outJSON = JSON.stringify({\n            environment: this._opt.environment,\n            queues: queues,\n        });\n        var req = {\n            method: 'POST',\n            url: this._url,\n            body: outJSON,\n        };\n        this._requester(req)\n            .then(function (_resp) {\n            // nothing\n        })\n            .catch(function (err) {\n            if (console.error) {\n                console.error('can not report queues breakdowns', err);\n            }\n        });\n    };\n    return QueuesStats;\n}());\nexport { QueuesStats };\n//# sourceMappingURL=queues.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport { makeRequester } from './http_req';\nimport { BaseMetric } from './metrics';\nimport { hasTdigest, TDigestStat, TDigestStatGroups } from './tdshared';\nvar FLUSH_INTERVAL = 15000; // 15 seconds\nvar RouteMetric = /** @class */ (function (_super) {\n    __extends(RouteMetric, _super);\n    function RouteMetric(method, route, statusCode, contentType) {\n        if (method === void 0) { method = ''; }\n        if (route === void 0) { route = ''; }\n        if (statusCode === void 0) { statusCode = 0; }\n        if (contentType === void 0) { contentType = ''; }\n        var _this = _super.call(this) || this;\n        _this.method = method;\n        _this.route = route;\n        _this.statusCode = statusCode;\n        _this.contentType = contentType;\n        _this.startTime = new Date();\n        return _this;\n    }\n    return RouteMetric;\n}(BaseMetric));\nexport { RouteMetric };\nvar RoutesStats = /** @class */ (function () {\n    function RoutesStats(opt) {\n        this._m = {};\n        this._opt = opt;\n        this._url = \"\".concat(opt.host, \"/api/v5/projects/\").concat(opt.projectId, \"/routes-stats?key=\").concat(opt.projectKey);\n        this._requester = makeRequester(opt);\n    }\n    RoutesStats.prototype.notify = function (req) {\n        var _this = this;\n        if (!hasTdigest) {\n            return;\n        }\n        if (!this._opt.performanceStats) {\n            return;\n        }\n        var ms = req._duration();\n        var minute = 60 * 1000;\n        var startTime = new Date(Math.floor(req.startTime.getTime() / minute) * minute);\n        var key = {\n            method: req.method,\n            route: req.route,\n            statusCode: req.statusCode,\n            time: startTime,\n        };\n        var keyStr = JSON.stringify(key);\n        var stat = this._m[keyStr];\n        if (!stat) {\n            stat = new TDigestStat();\n            this._m[keyStr] = stat;\n        }\n        stat.add(ms);\n        if (this._timer) {\n            return;\n        }\n        this._timer = setTimeout(function () {\n            _this._flush();\n        }, FLUSH_INTERVAL);\n    };\n    RoutesStats.prototype._flush = function () {\n        var routes = [];\n        for (var keyStr in this._m) {\n            if (!this._m.hasOwnProperty(keyStr)) {\n                continue;\n            }\n            var key = JSON.parse(keyStr);\n            var v = __assign(__assign({}, key), this._m[keyStr].toJSON());\n            routes.push(v);\n        }\n        this._m = {};\n        this._timer = null;\n        var outJSON = JSON.stringify({\n            environment: this._opt.environment,\n            routes: routes,\n        });\n        var req = {\n            method: 'POST',\n            url: this._url,\n            body: outJSON,\n        };\n        this._requester(req)\n            .then(function (_resp) {\n            // nothing\n        })\n            .catch(function (err) {\n            if (console.error) {\n                console.error('can not report routes stats', err);\n            }\n        });\n    };\n    return RoutesStats;\n}());\nexport { RoutesStats };\nvar RoutesBreakdowns = /** @class */ (function () {\n    function RoutesBreakdowns(opt) {\n        this._m = {};\n        this._opt = opt;\n        this._url = \"\".concat(opt.host, \"/api/v5/projects/\").concat(opt.projectId, \"/routes-breakdowns?key=\").concat(opt.projectKey);\n        this._requester = makeRequester(opt);\n    }\n    RoutesBreakdowns.prototype.notify = function (req) {\n        var _this = this;\n        if (!hasTdigest) {\n            return;\n        }\n        if (!this._opt.performanceStats) {\n            return;\n        }\n        if (req.statusCode < 200 ||\n            (req.statusCode >= 300 && req.statusCode < 400) ||\n            req.statusCode === 404 ||\n            Object.keys(req._groups).length === 0) {\n            return;\n        }\n        var ms = req._duration();\n        if (ms === 0) {\n            ms = 0.00001;\n        }\n        var minute = 60 * 1000;\n        var startTime = new Date(Math.floor(req.startTime.getTime() / minute) * minute);\n        var key = {\n            method: req.method,\n            route: req.route,\n            responseType: this._responseType(req),\n            time: startTime,\n        };\n        var keyStr = JSON.stringify(key);\n        var stat = this._m[keyStr];\n        if (!stat) {\n            stat = new TDigestStatGroups();\n            this._m[keyStr] = stat;\n        }\n        stat.addGroups(ms, req._groups);\n        if (this._timer) {\n            return;\n        }\n        this._timer = setTimeout(function () {\n            _this._flush();\n        }, FLUSH_INTERVAL);\n    };\n    RoutesBreakdowns.prototype._flush = function () {\n        var routes = [];\n        for (var keyStr in this._m) {\n            if (!this._m.hasOwnProperty(keyStr)) {\n                continue;\n            }\n            var key = JSON.parse(keyStr);\n            var v = __assign(__assign({}, key), this._m[keyStr].toJSON());\n            routes.push(v);\n        }\n        this._m = {};\n        this._timer = null;\n        var outJSON = JSON.stringify({\n            environment: this._opt.environment,\n            routes: routes,\n        });\n        var req = {\n            method: 'POST',\n            url: this._url,\n            body: outJSON,\n        };\n        this._requester(req)\n            .then(function (_resp) {\n            // nothing\n        })\n            .catch(function (err) {\n            if (console.error) {\n                console.error('can not report routes breakdowns', err);\n            }\n        });\n    };\n    RoutesBreakdowns.prototype._responseType = function (req) {\n        if (req.statusCode >= 500) {\n            return '5xx';\n        }\n        if (req.statusCode >= 400) {\n            return '4xx';\n        }\n        if (!req.contentType) {\n            return '';\n        }\n        var s = req.contentType.split(';')[0].split('/');\n        return s[s.length - 1];\n    };\n    return RoutesBreakdowns;\n}());\nexport { RoutesBreakdowns };\n//# sourceMappingURL=routes.js.map","export var NOTIFIER_NAME = 'airbrake-js/browser';\nexport var NOTIFIER_VERSION = '2.1.8';\nexport var NOTIFIER_URL = 'https://github.com/airbrake/airbrake-js/tree/master/packages/browser';\n//# sourceMappingURL=version.js.map","var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport { makeRequester } from './http_req';\nimport { NOTIFIER_NAME, NOTIFIER_VERSION } from './version';\n// API version to poll.\nvar API_VER = '2020-06-18';\n// How frequently we should poll the config API.\nvar DEFAULT_INTERVAL = 600000; // 10 minutes\nvar NOTIFIER_INFO = {\n    notifier_name: NOTIFIER_NAME,\n    notifier_version: NOTIFIER_VERSION,\n    os: typeof window !== 'undefined' &&\n        window.navigator &&\n        window.navigator.userAgent\n        ? window.navigator.userAgent\n        : undefined,\n    language: 'JavaScript',\n};\n// Remote config settings.\nvar ERROR_SETTING = 'errors';\nvar APM_SETTING = 'apm';\nvar RemoteSettings = /** @class */ (function () {\n    function RemoteSettings(opt) {\n        this._opt = opt;\n        this._requester = makeRequester(opt);\n        this._data = new SettingsData(opt.projectId, {\n            project_id: null,\n            poll_sec: 0,\n            updated_at: 0,\n            config_route: '',\n            settings: [],\n        });\n        this._origErrorNotifications = opt.errorNotifications;\n        this._origPerformanceStats = opt.performanceStats;\n    }\n    RemoteSettings.prototype.poll = function () {\n        var _this = this;\n        // First request is immediate. When it's done, we cancel it since we want to\n        // change interval time to the default value.\n        var pollerId = setInterval(function () {\n            _this._doRequest();\n            clearInterval(pollerId);\n        }, 0);\n        // Second fetch is what always runs in background.\n        return setInterval(this._doRequest.bind(this), DEFAULT_INTERVAL);\n    };\n    RemoteSettings.prototype._doRequest = function () {\n        var _this = this;\n        this._requester(this._requestParams(this._opt))\n            .then(function (resp) {\n            _this._data.merge(resp.json);\n            _this._opt.host = _this._data.errorHost();\n            _this._opt.apmHost = _this._data.apmHost();\n            _this._processErrorNotifications(_this._data);\n            _this._processPerformanceStats(_this._data);\n        })\n            .catch(function (_) {\n            return;\n        });\n    };\n    RemoteSettings.prototype._requestParams = function (opt) {\n        return {\n            method: 'GET',\n            url: this._pollUrl(opt),\n            headers: {\n                Accept: 'application/json',\n                'Cache-Control': 'no-cache,no-store',\n            },\n        };\n    };\n    RemoteSettings.prototype._pollUrl = function (opt) {\n        var url = this._data.configRoute(opt.remoteConfigHost);\n        var queryParams = '?';\n        for (var _i = 0, _a = this._entries(NOTIFIER_INFO); _i < _a.length; _i++) {\n            var _b = _a[_i], key = _b[0], value = _b[1];\n            queryParams += \"&\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(value));\n        }\n        return url + queryParams;\n    };\n    RemoteSettings.prototype._processErrorNotifications = function (data) {\n        if (!this._origErrorNotifications) {\n            return;\n        }\n        this._opt.errorNotifications = data.errorNotifications();\n    };\n    RemoteSettings.prototype._processPerformanceStats = function (data) {\n        if (!this._origPerformanceStats) {\n            return;\n        }\n        this._opt.performanceStats = data.performanceStats();\n    };\n    // Polyfill from:\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries#polyfill\n    RemoteSettings.prototype._entries = function (obj) {\n        var ownProps = Object.keys(obj);\n        var i = ownProps.length;\n        var resArray = new Array(i);\n        while (i--)\n            resArray[i] = [ownProps[i], obj[ownProps[i]]];\n        return resArray;\n    };\n    return RemoteSettings;\n}());\nexport { RemoteSettings };\nvar SettingsData = /** @class */ (function () {\n    function SettingsData(projectId, data) {\n        this._projectId = projectId;\n        this._data = data;\n    }\n    SettingsData.prototype.merge = function (other) {\n        this._data = __assign(__assign({}, this._data), other);\n    };\n    SettingsData.prototype.configRoute = function (remoteConfigHost) {\n        var host = remoteConfigHost.replace(/\\/$/, '');\n        var configRoute = this._data.config_route;\n        if (configRoute === null ||\n            configRoute === undefined ||\n            configRoute === '') {\n            return \"\".concat(host, \"/\").concat(API_VER, \"/config/\").concat(this._projectId, \"/config.json\");\n        }\n        else {\n            return \"\".concat(host, \"/\").concat(configRoute);\n        }\n    };\n    SettingsData.prototype.errorNotifications = function () {\n        var s = this._findSetting(ERROR_SETTING);\n        if (s === null) {\n            return true;\n        }\n        return s.enabled;\n    };\n    SettingsData.prototype.performanceStats = function () {\n        var s = this._findSetting(APM_SETTING);\n        if (s === null) {\n            return true;\n        }\n        return s.enabled;\n    };\n    SettingsData.prototype.errorHost = function () {\n        var s = this._findSetting(ERROR_SETTING);\n        if (s === null) {\n            return null;\n        }\n        return s.endpoint;\n    };\n    SettingsData.prototype.apmHost = function () {\n        var s = this._findSetting(APM_SETTING);\n        if (s === null) {\n            return null;\n        }\n        return s.endpoint;\n    };\n    SettingsData.prototype._findSetting = function (name) {\n        var settings = this._data.settings;\n        if (settings === null || settings === undefined) {\n            return null;\n        }\n        var setting = settings.find(function (s) {\n            return s.name === name;\n        });\n        if (setting === undefined) {\n            return null;\n        }\n        return setting;\n    };\n    return SettingsData;\n}());\nexport { SettingsData };\n//# sourceMappingURL=remote_settings.js.map","var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport Promise from 'promise-polyfill';\nimport { jsonifyNotice } from './jsonify_notice';\nimport { Scope } from './scope';\nimport { espProcessor } from './processor/esp';\nimport { angularMessageFilter } from './filter/angular_message';\nimport { makeDebounceFilter } from './filter/debounce';\nimport { ignoreNoiseFilter } from './filter/ignore_noise';\nimport { uncaughtMessageFilter } from './filter/uncaught_message';\nimport { makeRequester } from './http_req';\nimport { QueriesStats } from './queries';\nimport { QueueMetric, QueuesStats } from './queues';\nimport { RouteMetric, RoutesBreakdowns, RoutesStats } from './routes';\nimport { NOTIFIER_NAME, NOTIFIER_VERSION, NOTIFIER_URL } from './version';\nimport { RemoteSettings } from './remote_settings';\nvar BaseNotifier = /** @class */ (function () {\n    function BaseNotifier(opt) {\n        var _this = this;\n        this._filters = [];\n        this._performanceFilters = [];\n        this._scope = new Scope();\n        this._onClose = [];\n        if (!opt.projectId || !opt.projectKey) {\n            throw new Error('airbrake: projectId and projectKey are required');\n        }\n        this._opt = opt;\n        this._opt.host = this._opt.host || 'https://api.airbrake.io';\n        this._opt.remoteConfigHost =\n            this._opt.remoteConfigHost || 'https://notifier-configs.airbrake.io';\n        this._opt.apmHost = this._opt.apmHost || 'https://api.airbrake.io';\n        this._opt.timeout = this._opt.timeout || 10000;\n        this._opt.keysBlocklist = this._opt.keysBlocklist || [/password/, /secret/];\n        this._url = \"\".concat(this._opt.host, \"/api/v3/projects/\").concat(this._opt.projectId, \"/notices?key=\").concat(this._opt.projectKey);\n        this._opt.errorNotifications = this._opt.errorNotifications !== false;\n        this._opt.performanceStats = this._opt.performanceStats !== false;\n        this._opt.queryStats = this._opt.queryStats !== false;\n        this._opt.queueStats = this._opt.queueStats !== false;\n        this._opt.remoteConfig = this._opt.remoteConfig !== false;\n        this._processor = this._opt.processor || espProcessor;\n        this._requester = makeRequester(this._opt);\n        this.addFilter(ignoreNoiseFilter);\n        this.addFilter(makeDebounceFilter());\n        this.addFilter(uncaughtMessageFilter);\n        this.addFilter(angularMessageFilter);\n        this.addFilter(function (notice) {\n            notice.context.notifier = {\n                name: NOTIFIER_NAME,\n                version: NOTIFIER_VERSION,\n                url: NOTIFIER_URL,\n            };\n            if (_this._opt.environment) {\n                notice.context.environment = _this._opt.environment;\n            }\n            return notice;\n        });\n        this.routes = new Routes(this);\n        this.queues = new Queues(this);\n        this.queries = new QueriesStats(this._opt);\n        if (this._opt.remoteConfig) {\n            var pollerId_1 = new RemoteSettings(this._opt).poll();\n            this._onClose.push(function () { return clearInterval(pollerId_1); });\n        }\n    }\n    BaseNotifier.prototype.close = function () {\n        for (var _i = 0, _a = this._onClose; _i < _a.length; _i++) {\n            var fn = _a[_i];\n            fn();\n        }\n    };\n    BaseNotifier.prototype.scope = function () {\n        return this._scope;\n    };\n    BaseNotifier.prototype.setActiveScope = function (scope) {\n        this._scope = scope;\n    };\n    BaseNotifier.prototype.addFilter = function (filter) {\n        this._filters.push(filter);\n    };\n    BaseNotifier.prototype.addPerformanceFilter = function (performanceFilter) {\n        this._performanceFilters.push(performanceFilter);\n    };\n    BaseNotifier.prototype.notify = function (err) {\n        var notice = {\n            errors: [],\n            context: __assign(__assign({ severity: 'error' }, this.scope().context()), err.context),\n            params: err.params || {},\n            environment: err.environment || {},\n            session: err.session || {},\n        };\n        if (typeof err !== 'object' || err.error === undefined) {\n            err = { error: err };\n        }\n        if (!this._opt.errorNotifications) {\n            notice.error = new Error(\"airbrake: not sending this error, errorNotifications is disabled err=\".concat(JSON.stringify(err.error)));\n            return Promise.resolve(notice);\n        }\n        if (!err.error) {\n            notice.error = new Error(\"airbrake: got err=\".concat(JSON.stringify(err.error), \", wanted an Error\"));\n            return Promise.resolve(notice);\n        }\n        var error = this._processor(err.error);\n        notice.errors.push(error);\n        for (var _i = 0, _a = this._filters; _i < _a.length; _i++) {\n            var filter = _a[_i];\n            var r = filter(notice);\n            if (r === null) {\n                notice.error = new Error('airbrake: error is filtered');\n                return Promise.resolve(notice);\n            }\n            notice = r;\n        }\n        if (!notice.context) {\n            notice.context = {};\n        }\n        notice.context.language = 'JavaScript';\n        return this._sendNotice(notice);\n    };\n    BaseNotifier.prototype._sendNotice = function (notice) {\n        var body = jsonifyNotice(notice, {\n            keysBlocklist: this._opt.keysBlocklist,\n        });\n        if (this._opt.reporter) {\n            if (typeof this._opt.reporter === 'function') {\n                return this._opt.reporter(notice);\n            }\n            else {\n                console.warn('airbrake: options.reporter must be a function');\n            }\n        }\n        var req = {\n            method: 'POST',\n            url: this._url,\n            body: body,\n        };\n        return this._requester(req)\n            .then(function (resp) {\n            notice.id = resp.json.id;\n            notice.url = resp.json.url;\n            return notice;\n        })\n            .catch(function (err) {\n            notice.error = err;\n            return notice;\n        });\n    };\n    BaseNotifier.prototype.wrap = function (fn, props) {\n        if (props === void 0) { props = []; }\n        if (fn._airbrake) {\n            return fn;\n        }\n        // tslint:disable-next-line:no-this-assignment\n        var client = this;\n        var airbrakeWrapper = function () {\n            var fnArgs = Array.prototype.slice.call(arguments);\n            var wrappedArgs = client._wrapArguments(fnArgs);\n            try {\n                return fn.apply(this, wrappedArgs);\n            }\n            catch (err) {\n                client.notify({ error: err, params: { arguments: fnArgs } });\n                client._ignoreNextWindowError();\n                throw err;\n            }\n        };\n        for (var prop in fn) {\n            if (fn.hasOwnProperty(prop)) {\n                airbrakeWrapper[prop] = fn[prop];\n            }\n        }\n        for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {\n            var prop = props_1[_i];\n            if (fn.hasOwnProperty(prop)) {\n                airbrakeWrapper[prop] = fn[prop];\n            }\n        }\n        airbrakeWrapper._airbrake = true;\n        airbrakeWrapper.inner = fn;\n        return airbrakeWrapper;\n    };\n    BaseNotifier.prototype._wrapArguments = function (args) {\n        for (var i = 0; i < args.length; i++) {\n            var arg = args[i];\n            if (typeof arg === 'function') {\n                args[i] = this.wrap(arg);\n            }\n        }\n        return args;\n    };\n    BaseNotifier.prototype._ignoreNextWindowError = function () { };\n    BaseNotifier.prototype.call = function (fn) {\n        var _args = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            _args[_i - 1] = arguments[_i];\n        }\n        var wrapper = this.wrap(fn);\n        return wrapper.apply(this, Array.prototype.slice.call(arguments, 1));\n    };\n    return BaseNotifier;\n}());\nexport { BaseNotifier };\nvar Routes = /** @class */ (function () {\n    function Routes(notifier) {\n        this._notifier = notifier;\n        this._routes = new RoutesStats(notifier._opt);\n        this._breakdowns = new RoutesBreakdowns(notifier._opt);\n        this._opt = notifier._opt;\n    }\n    Routes.prototype.start = function (method, route, statusCode, contentType) {\n        if (method === void 0) { method = ''; }\n        if (route === void 0) { route = ''; }\n        if (statusCode === void 0) { statusCode = 0; }\n        if (contentType === void 0) { contentType = ''; }\n        var metric = new RouteMetric(method, route, statusCode, contentType);\n        if (!this._opt.performanceStats) {\n            return metric;\n        }\n        var scope = this._notifier.scope().clone();\n        scope.setContext({ httpMethod: method, route: route });\n        scope.setRouteMetric(metric);\n        this._notifier.setActiveScope(scope);\n        return metric;\n    };\n    Routes.prototype.notify = function (req) {\n        if (!this._opt.performanceStats) {\n            return;\n        }\n        req.end();\n        for (var _i = 0, _a = this._notifier._performanceFilters; _i < _a.length; _i++) {\n            var performanceFilter = _a[_i];\n            if (performanceFilter(req) === null) {\n                return;\n            }\n        }\n        this._routes.notify(req);\n        this._breakdowns.notify(req);\n    };\n    return Routes;\n}());\nvar Queues = /** @class */ (function () {\n    function Queues(notifier) {\n        this._notifier = notifier;\n        this._queues = new QueuesStats(notifier._opt);\n        this._opt = notifier._opt;\n    }\n    Queues.prototype.start = function (queue) {\n        var metric = new QueueMetric(queue);\n        if (!this._opt.performanceStats) {\n            return metric;\n        }\n        var scope = this._notifier.scope().clone();\n        scope.setContext({ queue: queue });\n        scope.setQueueMetric(metric);\n        this._notifier.setActiveScope(scope);\n        return metric;\n    };\n    Queues.prototype.notify = function (q) {\n        if (!this._opt.performanceStats) {\n            return;\n        }\n        q.end();\n        this._queues.notify(q);\n    };\n    return Queues;\n}());\n//# sourceMappingURL=base_notifier.js.map","export function windowFilter(notice) {\n    if (window.navigator && window.navigator.userAgent) {\n        notice.context.userAgent = window.navigator.userAgent;\n    }\n    if (window.location) {\n        notice.context.url = String(window.location);\n        // Set root directory to group errors on different subdomains together.\n        notice.context.rootDirectory =\n            window.location.protocol + '//' + window.location.host;\n    }\n    return notice;\n}\n//# sourceMappingURL=window.js.map","var CONSOLE_METHODS = ['debug', 'log', 'info', 'warn', 'error'];\nexport function instrumentConsole(notifier) {\n    var _loop_1 = function (m) {\n        if (!(m in console)) {\n            return \"continue\";\n        }\n        var oldFn = console[m];\n        var newFn = (function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            oldFn.apply(console, args);\n            notifier.scope().pushHistory({\n                type: 'log',\n                severity: m,\n                arguments: args,\n            });\n        });\n        newFn.inner = oldFn;\n        console[m] = newFn;\n    };\n    // tslint:disable-next-line:no-this-assignment\n    for (var _i = 0, CONSOLE_METHODS_1 = CONSOLE_METHODS; _i < CONSOLE_METHODS_1.length; _i++) {\n        var m = CONSOLE_METHODS_1[_i];\n        _loop_1(m);\n    }\n}\n//# sourceMappingURL=console.js.map","var elemAttrs = ['type', 'name', 'src'];\nexport function instrumentDOM(notifier) {\n    var handler = makeEventHandler(notifier);\n    if (window.addEventListener) {\n        window.addEventListener('load', handler);\n        window.addEventListener('error', function (event) {\n            if (getProp(event, 'error')) {\n                return;\n            }\n            handler(event);\n        }, true);\n    }\n    if (typeof document === 'object' && document.addEventListener) {\n        document.addEventListener('DOMContentLoaded', handler);\n        document.addEventListener('click', handler);\n        document.addEventListener('keypress', handler);\n    }\n}\nfunction makeEventHandler(notifier) {\n    return function (event) {\n        var target = getProp(event, 'target');\n        if (!target) {\n            return;\n        }\n        var state = { type: event.type };\n        try {\n            state.target = elemPath(target);\n        }\n        catch (err) {\n            state.target = \"<\".concat(String(err), \">\");\n        }\n        notifier.scope().pushHistory(state);\n    };\n}\nfunction elemName(elem) {\n    if (!elem) {\n        return '';\n    }\n    var s = [];\n    if (elem.tagName) {\n        s.push(elem.tagName.toLowerCase());\n    }\n    if (elem.id) {\n        s.push('#');\n        s.push(elem.id);\n    }\n    if (elem.classList && Array.from) {\n        s.push('.');\n        s.push(Array.from(elem.classList).join('.'));\n    }\n    else if (elem.className) {\n        var str = classNameString(elem.className);\n        if (str !== '') {\n            s.push('.');\n            s.push(str);\n        }\n    }\n    if (elem.getAttribute) {\n        for (var _i = 0, elemAttrs_1 = elemAttrs; _i < elemAttrs_1.length; _i++) {\n            var attr = elemAttrs_1[_i];\n            var value = elem.getAttribute(attr);\n            if (value) {\n                s.push(\"[\".concat(attr, \"=\\\"\").concat(value, \"\\\"]\"));\n            }\n        }\n    }\n    return s.join('');\n}\nfunction classNameString(name) {\n    if (name.split) {\n        return name.split(' ').join('.');\n    }\n    if (name.baseVal && name.baseVal.split) {\n        // SVGAnimatedString\n        return name.baseVal.split(' ').join('.');\n    }\n    console.error('unsupported HTMLElement.className type', typeof name);\n    return '';\n}\nfunction elemPath(elem) {\n    var maxLen = 10;\n    var path = [];\n    var parent = elem;\n    while (parent) {\n        var name_1 = elemName(parent);\n        if (name_1 !== '') {\n            path.push(name_1);\n            if (path.length > maxLen) {\n                break;\n            }\n        }\n        parent = parent.parentNode;\n    }\n    if (path.length === 0) {\n        return String(elem);\n    }\n    return path.reverse().join(' > ');\n}\nfunction getProp(obj, prop) {\n    try {\n        return obj[prop];\n    }\n    catch (_) {\n        // Permission denied to access property\n        return null;\n    }\n}\n//# sourceMappingURL=dom.js.map","export function instrumentFetch(notifier) {\n    // tslint:disable-next-line:no-this-assignment\n    var oldFetch = window.fetch;\n    window.fetch = function (req, options) {\n        var state = {\n            type: 'xhr',\n            date: new Date(),\n        };\n        state.method = options && options.method ? options.method : 'GET';\n        if (typeof req === 'string') {\n            state.url = req;\n        }\n        else {\n            state.method = req.method;\n            state.url = req.url;\n        }\n        // Some platforms (e.g. react-native) implement fetch via XHR.\n        notifier._ignoreNextXHR++;\n        setTimeout(function () { return notifier._ignoreNextXHR--; });\n        return oldFetch\n            .apply(this, arguments)\n            .then(function (resp) {\n            state.statusCode = resp.status;\n            state.duration = new Date().getTime() - state.date.getTime();\n            notifier.scope().pushHistory(state);\n            return resp;\n        })\n            .catch(function (err) {\n            state.error = err;\n            state.duration = new Date().getTime() - state.date.getTime();\n            notifier.scope().pushHistory(state);\n            throw err;\n        });\n    };\n}\n//# sourceMappingURL=fetch.js.map","var lastLocation = '';\n// In some environments (i.e. Cypress) document.location may sometimes be null\nfunction getCurrentLocation() {\n    return document.location && document.location.pathname;\n}\nexport function instrumentLocation(notifier) {\n    lastLocation = getCurrentLocation();\n    var oldFn = window.onpopstate;\n    window.onpopstate = function abOnpopstate(_event) {\n        var url = getCurrentLocation();\n        if (url) {\n            recordLocation(notifier, url);\n        }\n        if (oldFn) {\n            return oldFn.apply(this, arguments);\n        }\n    };\n    var oldPushState = history.pushState;\n    history.pushState = function abPushState(_state, _title, url) {\n        if (url) {\n            recordLocation(notifier, url.toString());\n        }\n        oldPushState.apply(this, arguments);\n    };\n}\nfunction recordLocation(notifier, url) {\n    var index = url.indexOf('://');\n    if (index >= 0) {\n        url = url.slice(index + 3);\n        index = url.indexOf('/');\n        url = index >= 0 ? url.slice(index) : '/';\n    }\n    else if (url.charAt(0) !== '/') {\n        url = '/' + url;\n    }\n    notifier.scope().pushHistory({\n        type: 'location',\n        from: lastLocation,\n        to: url,\n    });\n    lastLocation = url;\n}\n//# sourceMappingURL=location.js.map","export function instrumentXHR(notifier) {\n    function recordReq(req) {\n        var state = req.__state;\n        state.statusCode = req.status;\n        state.duration = new Date().getTime() - state.date.getTime();\n        notifier.scope().pushHistory(state);\n    }\n    var oldOpen = XMLHttpRequest.prototype.open;\n    XMLHttpRequest.prototype.open = function abOpen(method, url, _async, _user, _password) {\n        if (notifier._ignoreNextXHR === 0) {\n            this.__state = {\n                type: 'xhr',\n                method: method,\n                url: url,\n            };\n        }\n        oldOpen.apply(this, arguments);\n    };\n    var oldSend = XMLHttpRequest.prototype.send;\n    XMLHttpRequest.prototype.send = function abSend(_data) {\n        var oldFn = this.onreadystatechange;\n        this.onreadystatechange = function (_ev) {\n            if (this.readyState === 4 && this.__state) {\n                recordReq(this);\n            }\n            if (oldFn) {\n                return oldFn.apply(this, arguments);\n            }\n        };\n        if (this.__state) {\n            this.__state.date = new Date();\n        }\n        return oldSend.apply(this, arguments);\n    };\n}\n//# sourceMappingURL=xhr.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport Promise from 'promise-polyfill';\nimport { BaseNotifier } from './base_notifier';\nimport { windowFilter } from './filter/window';\nimport { instrumentConsole } from './instrumentation/console';\nimport { instrumentDOM } from './instrumentation/dom';\nimport { instrumentFetch } from './instrumentation/fetch';\nimport { instrumentLocation } from './instrumentation/location';\nimport { instrumentXHR } from './instrumentation/xhr';\nvar Notifier = /** @class */ (function (_super) {\n    __extends(Notifier, _super);\n    function Notifier(opt) {\n        var _this = _super.call(this, opt) || this;\n        _this.offline = false;\n        _this.todo = [];\n        _this._ignoreWindowError = 0;\n        _this._ignoreNextXHR = 0;\n        if (typeof window === 'undefined') {\n            return _this;\n        }\n        _this.addFilter(windowFilter);\n        if (window.addEventListener) {\n            _this.onOnline = _this.onOnline.bind(_this);\n            window.addEventListener('online', _this.onOnline);\n            _this.onOffline = _this.onOffline.bind(_this);\n            window.addEventListener('offline', _this.onOffline);\n            _this.onUnhandledrejection = _this.onUnhandledrejection.bind(_this);\n            window.addEventListener('unhandledrejection', _this.onUnhandledrejection);\n            _this._onClose.push(function () {\n                window.removeEventListener('online', _this.onOnline);\n                window.removeEventListener('offline', _this.onOffline);\n                window.removeEventListener('unhandledrejection', _this.onUnhandledrejection);\n            });\n        }\n        _this._instrument(opt.instrumentation);\n        return _this;\n    }\n    Notifier.prototype._instrument = function (opt) {\n        if (opt === void 0) { opt = {}; }\n        if (opt.console === undefined) {\n            opt.console = !isDevEnv(this._opt.environment);\n        }\n        if (enabled(opt.onerror)) {\n            // tslint:disable-next-line:no-this-assignment\n            var self_1 = this;\n            var oldHandler_1 = window.onerror;\n            window.onerror = function abOnerror() {\n                if (oldHandler_1) {\n                    oldHandler_1.apply(this, arguments);\n                }\n                self_1.onerror.apply(self_1, arguments);\n            };\n        }\n        instrumentDOM(this);\n        if (enabled(opt.fetch) && typeof fetch === 'function') {\n            instrumentFetch(this);\n        }\n        if (enabled(opt.history) && typeof history === 'object') {\n            instrumentLocation(this);\n        }\n        if (enabled(opt.console) && typeof console === 'object') {\n            instrumentConsole(this);\n        }\n        if (enabled(opt.xhr) && typeof XMLHttpRequest !== 'undefined') {\n            instrumentXHR(this);\n        }\n    };\n    Notifier.prototype.notify = function (err) {\n        var _this = this;\n        if (this.offline) {\n            return new Promise(function (resolve, reject) {\n                _this.todo.push({\n                    err: err,\n                    resolve: resolve,\n                    reject: reject,\n                });\n                while (_this.todo.length > 100) {\n                    var j = _this.todo.shift();\n                    if (j === undefined) {\n                        break;\n                    }\n                    j.resolve({\n                        error: new Error('airbrake: offline queue is too large'),\n                    });\n                }\n            });\n        }\n        return _super.prototype.notify.call(this, err);\n    };\n    Notifier.prototype.onOnline = function () {\n        this.offline = false;\n        var _loop_1 = function (j) {\n            this_1.notify(j.err).then(function (notice) {\n                j.resolve(notice);\n            });\n        };\n        var this_1 = this;\n        for (var _i = 0, _a = this.todo; _i < _a.length; _i++) {\n            var j = _a[_i];\n            _loop_1(j);\n        }\n        this.todo = [];\n    };\n    Notifier.prototype.onOffline = function () {\n        this.offline = true;\n    };\n    Notifier.prototype.onUnhandledrejection = function (e) {\n        // Handle native or bluebird Promise rejections\n        // https://developer.mozilla.org/en-US/docs/Web/Events/unhandledrejection\n        // http://bluebirdjs.com/docs/api/error-management-configuration.html\n        var reason = e.reason || (e.detail && e.detail.reason);\n        if (!reason) {\n            return;\n        }\n        var msg = reason.message || String(reason);\n        if (msg.indexOf && msg.indexOf('airbrake: ') === 0) {\n            return;\n        }\n        if (typeof reason !== 'object' || reason.error === undefined) {\n            this.notify({\n                error: reason,\n                context: {\n                    unhandledRejection: true,\n                },\n            });\n            return;\n        }\n        this.notify(__assign(__assign({}, reason), { context: {\n                unhandledRejection: true,\n            } }));\n    };\n    Notifier.prototype.onerror = function (message, filename, line, column, err) {\n        if (this._ignoreWindowError > 0) {\n            return;\n        }\n        if (err) {\n            this.notify({\n                error: err,\n                context: {\n                    windowError: true,\n                },\n            });\n            return;\n        }\n        // Ignore errors without file or line.\n        if (!filename || !line) {\n            return;\n        }\n        this.notify({\n            error: {\n                message: message,\n                fileName: filename,\n                lineNumber: line,\n                columnNumber: column,\n                noStack: true,\n            },\n            context: {\n                windowError: true,\n            },\n        });\n    };\n    Notifier.prototype._ignoreNextWindowError = function () {\n        var _this = this;\n        this._ignoreWindowError++;\n        setTimeout(function () { return _this._ignoreWindowError--; });\n    };\n    return Notifier;\n}(BaseNotifier));\nexport { Notifier };\nfunction isDevEnv(env) {\n    return env && env.startsWith && env.startsWith('dev');\n}\nfunction enabled(v) {\n    return v === undefined || v === true;\n}\n//# sourceMappingURL=notifier.js.map","// eslint-disable-next-line import/no-extraneous-dependencies\nimport { Notifier } from \"@airbrake/browser\";\n\nconst airbrake = new Notifier({\n  projectId: 513828,\n  projectKey: \"11a30a6671a383d017c6abcada2048d2\"\n});\n\nairbrake.addFilter(notice => {\n  const { backtrace } = notice.errors[0];\n\n  // We want to check the backtrace to ensure the error comes from our app and not an external source\n  const isFromApp = backtrace.every(url => {\n    return url.file.includes(\"/app/javascript\");\n  });\n\n  if (!isFromApp) {\n    return null;\n  }\n\n  return notice;\n});\n"],"names":["finallyConstructor","callback","constructor","value","reason","allSettled","arr","P","resolve","reject","args","remaining","res","i","val","then","e","AggregateError","errors","message","any","rejectionReasons","error","ex","setTimeoutFunc","isArray","x","noop","bind","fn","thisArg","Promise","doResolve","handle","self","deferred","cb","ret","newValue","finale","len","Handler","onFulfilled","onRejected","promise","done","prom","promiseFinally","err","FILTERED","MAX_OBJ_LENGTH","jsonifyNotice","notice","_a","_b","_c","maxLength","_d","keysBlocklist","t","Truncator","s","keys","level","opts","_i","keys_1","key","obj","truncate","params","_e","keys_2","scale","num","depth","type","objectType","saved","index","path","sub","getAttr","length","dst","el","isBlocklisted","attr","keysBlocklist_1","v","Span","metric","name","startTime","endTime","now","BaseMetric","span","ms","NoopMetric","_name","_startTime","_ms","__assign","p","Scope","clone","context","ctx","state","root","factory","module","this","_isNumber","n","_capitalize","str","_getter","booleanProps","numericProps","stringProps","arrayProps","objectProps","props","StackFrame","fileName","lineNumber","columnNumber","functionName","argsStartIndex","argsEndIndex","locationString","parts","j","k","require$$0","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","urlLike","regExp","filtered","line","sanitizedLine","location","locationParts","functionNameRegex","matches","lineRE","lines","result","match","tokens","functionCall","argsRaw","hasConsole","parse","ErrorStackParser","parseErr","espProcessor","backtrace","frames_2","fakeErr","frames_1","frame","msg","re","angularMessageFilter","m","makeDebounceFilter","lastNoticeJSON","timeout","IGNORED_MESSAGES","ignoreNoiseFilter","uncaughtMessageFilter","global","__self__","F","exports","support","isDataView","viewClasses","isArrayBufferView","normalizeName","normalizeValue","iteratorFor","items","iterator","Headers","headers","header","oldValue","consumed","body","fileReaderReady","reader","readBlobAsArrayBuffer","blob","readBlobAsText","readArrayBufferAsText","buf","view","chars","bufferClone","Body","rejected","decode","methods","normalizeMethod","method","upcased","Request","input","options","form","bytes","split","parseHeaders","rawHeaders","preProcessedHeaders","Response","bodyInit","response","redirectStatuses","url","status","fetch","init","request","xhr","abortXhr","rateLimitReset","req","utime","opt","resp","json","makeRequester","api","h","makeNodeRequester","fetchRequest","__extends","extendStatics","d","b","__","tdigest","hasTdigest","TDigestStat","tdigestCentroids","TDigestStatGroups","_super","_this","totalMs","groups","name_1","stat","td","means","counts","c","FLUSH_INTERVAL","QueryInfo","query","QueriesStats","q","minute","keyStr","queries","outJSON","_resp","QueueMetric","queue","QueuesStats","queues","RouteMetric","route","statusCode","contentType","RoutesStats","routes","RoutesBreakdowns","NOTIFIER_NAME","NOTIFIER_VERSION","NOTIFIER_URL","API_VER","DEFAULT_INTERVAL","NOTIFIER_INFO","ERROR_SETTING","APM_SETTING","RemoteSettings","SettingsData","pollerId","_","queryParams","data","ownProps","resArray","projectId","other","remoteConfigHost","host","configRoute","settings","setting","BaseNotifier","Routes","Queues","pollerId_1","scope","filter","performanceFilter","r","client","airbrakeWrapper","fnArgs","wrappedArgs","prop","props_1","arg","wrapper","notifier","windowFilter","CONSOLE_METHODS","instrumentConsole","_loop_1","oldFn","newFn","CONSOLE_METHODS_1","elemAttrs","instrumentDOM","handler","makeEventHandler","event","getProp","target","elemPath","elemName","elem","classNameString","elemAttrs_1","maxLen","parent","instrumentFetch","oldFetch","lastLocation","getCurrentLocation","instrumentLocation","_event","recordLocation","oldPushState","_state","_title","instrumentXHR","recordReq","oldOpen","_async","_user","_password","oldSend","_data","_ev","Notifier","isDevEnv","enabled","self_1","oldHandler_1","this_1","filename","column","env","airbrake"],"mappings":"oDAGA,SAASA,GAAmBC,EAAU,CACpC,IAAIC,EAAc,KAAK,YACvB,OAAO,KAAK,KACV,SAASC,EAAO,CAEd,OAAOD,EAAY,QAAQD,EAAQ,CAAE,EAAE,KAAK,UAAW,CACrD,OAAOE,CACf,CAAO,CACF,EACD,SAASC,EAAQ,CAEf,OAAOF,EAAY,QAAQD,EAAQ,CAAE,EAAE,KAAK,UAAW,CAErD,OAAOC,EAAY,OAAOE,CAAM,CACxC,CAAO,CACP,CACG,CACH,CCpBA,SAASC,GAAWC,EAAK,CACvB,IAAIC,EAAI,KACR,OAAO,IAAIA,EAAE,SAASC,EAASC,EAAQ,CACrC,GAAI,EAAEH,GAAO,OAAOA,EAAI,OAAW,KACjC,OAAOG,EACL,IAAI,UACF,OAAOH,EACL,IACAA,EACA,gEACZ,CACO,EAEH,IAAII,EAAO,MAAM,UAAU,MAAM,KAAKJ,CAAG,EACzC,GAAII,EAAK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