diff --git a/dist/rollbar.js b/dist/rollbar.js index 94d255d8..13caf260 100644 --- a/dist/rollbar.js +++ b/dist/rollbar.js @@ -1018,7 +1018,7 @@ module.exports = { "use strict"; -var ErrorStackParser = __webpack_require__(21); +var ErrorStackParser = __webpack_require__(23); var UNKNOWN_FUNCTION = '?'; var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): '); @@ -1347,12 +1347,12 @@ module.exports = rollbar; var Rollbar = __webpack_require__(8); -var telemeter = __webpack_require__(28); -var instrumenter = __webpack_require__(29); -var polyfillJSON = __webpack_require__(32); -var wrapGlobals = __webpack_require__(34); +var telemeter = __webpack_require__(30); +var instrumenter = __webpack_require__(31); +var polyfillJSON = __webpack_require__(34); +var wrapGlobals = __webpack_require__(36); var scrub = __webpack_require__(4); -var truncation = __webpack_require__(35); +var truncation = __webpack_require__(37); Rollbar.setComponents({ telemeter: telemeter, @@ -1382,10 +1382,10 @@ var globals = __webpack_require__(18); var Transport = __webpack_require__(19); var urllib = __webpack_require__(2); -var transforms = __webpack_require__(20); -var sharedTransforms = __webpack_require__(23); -var predicates = __webpack_require__(24); -var sharedPredicates = __webpack_require__(25); +var transforms = __webpack_require__(22); +var sharedTransforms = __webpack_require__(25); +var predicates = __webpack_require__(26); +var sharedPredicates = __webpack_require__(27); var errorParser = __webpack_require__(3); function Rollbar(options, client) { @@ -1914,8 +1914,8 @@ function _gWindow() { return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); } -var defaults = __webpack_require__(26); -var scrubFields = __webpack_require__(27); +var defaults = __webpack_require__(28); +var scrubFields = __webpack_require__(29); var defaultOptions = { version: defaults.version, @@ -2991,6 +2991,7 @@ function getTransportFromOptions(options, defaults, url) { var path = defaults.path; var search = defaults.search; var timeout = options.timeout; + var transport = detectTransport(options) var proxy = options.proxy; if (options.endpoint) { @@ -3008,16 +3009,26 @@ function getTransportFromOptions(options, defaults, url) { port: port, path: path, search: search, - proxy: proxy + proxy: proxy, + transport: transport }; } +function detectTransport(options) { + var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); + var transport = options.defaultTransport || 'xhr'; + if (typeof gWindow.fetch === 'undefined') transport = 'xhr'; + if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch'; + return transport; +} + function transportOptions(transport, method) { var protocol = transport.protocol || 'https:'; var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined); var hostname = transport.hostname; var path = transport.path; var timeout = transport.timeout; + var transportAPI = transport.transport; if (transport.search) { path = path + transport.search; } @@ -3033,7 +3044,8 @@ function transportOptions(transport, method) { hostname: hostname, path: path, port: port, - method: method + method: method, + transport: transportAPI }; } @@ -3235,10 +3247,9 @@ module.exports = { "use strict"; -/*global XDomainRequest*/ - var _ = __webpack_require__(0); -var logger = __webpack_require__(1); +var makeFetchRequest = __webpack_require__(20); +var makeXhrRequest = __webpack_require__(21); /* * accessToken may be embedded in payload but that should not @@ -3250,6 +3261,7 @@ var logger = __webpack_require__(1); * path * port * method + * transport ('xhr' | 'fetch') * } * * params is an object containing key/value pairs. These @@ -3269,7 +3281,9 @@ Transport.prototype.get = function(accessToken, options, params, callback, reque var method = 'GET'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport + ); } Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) { @@ -3294,7 +3308,9 @@ Transport.prototype.post = function(accessToken, options, payload, callback, req var writeData = stringifyResult.value; var method = 'POST'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport + ); } Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) { @@ -3304,7 +3320,9 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa var method = 'POST'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport + ); } @@ -3312,7 +3330,7 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa // so Angular change detection isn't triggered on each API call. // This is the equivalent of runOutsideAngular(). // -function _makeZoneRequest() { +Transport.prototype._makeZoneRequest = function () { var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current; var args = Array.prototype.slice.call(arguments); @@ -3320,10 +3338,24 @@ function _makeZoneRequest() { if (currentZone && currentZone._name === 'angular') { var rootZone = currentZone._parent; rootZone.run(function () { - _makeRequest.apply(undefined, args); + this._makeRequest.apply(undefined, args); }); } else { - _makeRequest.apply(undefined, args); + this._makeRequest.apply(undefined, args); + } +} + +Transport.prototype._makeRequest = function ( + accessToken, url, method, data, callback, requestFactory, timeout, transport +) { + if (typeof RollbarProxy !== 'undefined') { + return _proxyRequest(data, callback); + } + + if (transport === 'fetch') { + makeFetchRequest(accessToken, url, method, data, callback, timeout) + } else { + makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) } } @@ -3339,11 +3371,66 @@ function _proxyRequest(json, callback) { ); } -function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) { - if (typeof RollbarProxy !== 'undefined') { - return _proxyRequest(data, callback); +module.exports = Transport; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); +var _ = __webpack_require__(0); + +function makeFetchRequest(accessToken, url, method, data, callback, timeout) { + var controller; + var timeoutId; + + if(_.isFiniteNumber(timeout)) { + controller = new AbortController(); + timeoutId = setTimeout(() => controller.abort(), timeout); } + fetch(url, { + method: method, + headers: { + 'Content-Type': 'application/json', + 'X-Rollbar-Access-Token': accessToken, + signal: controller && controller.signal + }, + body: data, + }) + .then((response) => { + if (timeoutId) clearTimeout(timeoutId); + return response.json(); + }) + .then((data) => { + callback(null, data); + }) + .catch((error) => { + logger.error(error.message); + callback(error); + }); +} + +module.exports = makeFetchRequest; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/*global XDomainRequest*/ + +var _ = __webpack_require__(0); +var logger = __webpack_require__(1); + +function makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) { var request; if (requestFactory) { request = requestFactory(); @@ -3496,11 +3583,11 @@ function _newRetriableError(message, code) { return err; } -module.exports = Transport; +module.exports = makeXhrRequest; /***/ }), -/* 20 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3847,7 +3934,7 @@ module.exports = { /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -3856,7 +3943,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /* istanbul ignore next */ if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(24)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -3907,21 +3994,21 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ return filtered.map(function(line) { if (line.indexOf('(eval ') > -1) { // Throw away eval information until we implement stacktrace.js/stackframe#8 - line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, ''); + line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, ''); } - var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '('); + var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, ''); // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in // case it has spaces in it, as the string is split on \s+ later on - var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/); + var location = sanitizedLine.match(/ (\(.+\)$)/); // remove the parenthesized location from the line, if it was matched sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine; - var tokens = sanitizedLine.split(/\s+/).slice(1); - // if a location was matched, pass it to extractLocation() otherwise pop the last token - var locationParts = this.extractLocation(location ? location[1] : tokens.pop()); - var functionName = tokens.join(' ') || undefined; + // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine + // because this line doesn't have function name + var locationParts = this.extractLocation(location ? location[1] : sanitizedLine); + var functionName = location && sanitizedLine || undefined; var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0]; return new StackFrame({ @@ -4054,7 +4141,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 22 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -4202,7 +4289,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 23 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4359,7 +4446,7 @@ module.exports = { /***/ }), -/* 24 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4380,7 +4467,7 @@ module.exports = { /***/ }), -/* 25 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4582,14 +4669,14 @@ module.exports = { /***/ }), -/* 26 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { - version: '2.25.2', + version: '2.26.0', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', @@ -4600,7 +4687,7 @@ module.exports = { /***/ }), -/* 27 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4668,7 +4755,7 @@ module.exports = { /***/ }), -/* 28 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4854,17 +4941,17 @@ module.exports = Telemeter; /***/ }), -/* 29 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(0); -var headers = __webpack_require__(30); +var headers = __webpack_require__(32); var scrub = __webpack_require__(4); var urlparser = __webpack_require__(2); -var domUtil = __webpack_require__(31); +var domUtil = __webpack_require__(33); var defaults = { network: true, @@ -5245,6 +5332,9 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.trackHttpErrors()) { metadata.stack = (new Error()).stack; } + + // Start our handler before returning the promise. This allows resp.clone() + // to execute before other handlers touch the response. return orig.apply(this, args).then(function (resp) { metadata.end_time_ms = _.now(); metadata.status_code = resp.status; @@ -5257,6 +5347,7 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.autoInstrument.networkResponseBody) { if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms // The response must be cloned to prevent reading (and locking) the original stream. + // This must be done before other handlers touch the response. body = resp.clone().text(); //returns a Promise } } @@ -5632,7 +5723,7 @@ module.exports = Instrumenter; /***/ }), -/* 30 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5735,7 +5826,7 @@ module.exports = headers; /***/ }), -/* 31 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5874,19 +5965,19 @@ module.exports = { /***/ }), -/* 32 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var polyfillJSON = __webpack_require__(33); +var polyfillJSON = __webpack_require__(35); module.exports = polyfillJSON; /***/ }), -/* 33 */ +/* 35 */ /***/ (function(module, exports) { // json3.js @@ -6655,7 +6746,7 @@ module.exports = setupCustomJSON; /***/ }), -/* 34 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6705,7 +6796,7 @@ module.exports = wrapGlobals; /***/ }), -/* 35 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/dist/rollbar.js.map b/dist/rollbar.js.map index d2580f31..4f95b3a3 100644 --- a/dist/rollbar.js.map +++ b/dist/rollbar.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/utility/headers.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;;;;;;;ACvBa;;AAEb,cAAc,mBAAO,CAAC,CAAQ;AAC9B,gBAAgB,mBAAO,CAAC,EAAc;AACtC,mBAAmB,mBAAO,CAAC,EAAa;AACxC,mBAAmB,mBAAO,CAAC,EAAyB;AACpD,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,CAAU;AAC9B,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACnBa;;AAEb,aAAa,mBAAO,CAAC,CAAY;AACjC,QAAQ,mBAAO,CAAC,CAAY;AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transport/fetch.js","webpack:///./src/browser/transport/xhr.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/utility/headers.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACz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ACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.min.js b/dist/rollbar.min.js index 2d264d97..82d6b04d 100644 --- a/dist/rollbar.min.js +++ b/dist/rollbar.min.js @@ -1 +1 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(30),i=r(4),s=r(2),a=r(31),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}]); \ No newline at end of file +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(20),i=r(21);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){this._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout(()=>u.abort(),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then(t=>(c&&clearTimeout(c),t.json())).then(t=>{s(null,t)}).catch(t=>{n.error(t.message),s(t)})}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(32),i=r(4),s=r(2),a=r(33),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}]); \ No newline at end of file diff --git a/dist/rollbar.min.js.map b/dist/rollbar.min.js.map index 714a704f..9f4d717a 100644 --- a/dist/rollbar.min.js.map +++ b/dist/rollbar.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/utility/headers.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb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sX,IAGxC,SAASic,EAAkBC,GAMzB,OALIA,EAAU3tB,mBACL2tB,EAAU3tB,UAAU8W,YAC3B6W,EAAU3tB,UAAU1K,QAAUi4B,EAAmB,IAAKI,EAAU3tB,UAAU1K,UAE5Eq4B,EAAUpW,OAAS6V,EAAaO,EAAUpW,OAAQ,GAC3CoW,EAGT,SAASC,EAAQzzB,EAASsX,GACxB,IAAIxD,EAAO9T,EAAQ3B,KAAKyV,KACxB,GAAIA,EAAKkL,YAEP,IADA,IAAItB,EAAQ5J,EAAKkL,YACR/oB,EAAI,EAAGA,EAAIynB,EAAMhiB,OAAQzF,IAChCynB,EAAMznB,GAAKs9B,EAAkB7V,EAAMznB,SAE5B6d,EAAK+I,QACd/I,EAAK+I,MAAQ0W,EAAkBzf,EAAK+I,QAEtC,MAAO,CAAC7c,EAASoE,EAAEpK,UAAUgG,EAASsX,IAGxC,SAASoc,EAAgB1zB,EAAS2zB,GAChC,OAAOvvB,EAAEN,YAAY9D,GAAW2zB,EA0BlC39B,EAAOD,QAAU,CACf+hB,SAxBF,SAAkB9X,EAASsX,EAAYqc,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAAS94B,EARnB+4B,EAAa,CACf3W,EACAgW,EACAE,EAAgB57B,KAAK,KAAM,MAC3B47B,EAAgB57B,KAAK,KAAM,KAC3B47B,EAAgB57B,KAAK,KAAM,KAC3Bg8B,GAIMG,EAAWE,EAAWhd,SAI5B,GAFA9W,GADA6zB,EAAUD,EAAS5zB,EAASsX,IACV,IAClBvc,EAAS84B,EAAQ,IACN15B,QAAUu5B,EAAgB34B,EAAO7D,MAAOy8B,GACjD,OAAO54B,EAGX,OAAOA,GAOPoiB,IAAKA,EACLgW,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transport/fetch.js","webpack:///./src/browser/transport/xhr.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/utility/headers.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","opts","method","transportAPI","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","makeFetchRequest","makeXhrRequest","requestFactory","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","json","_msg","_proxyRequest","controller","timeoutId","AbortController","abort","headers","signal","response","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","tokens","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,I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QAEtC,MAAO,CAAC5d,EAASoE,EAAEpK,UAAUgG,EAASsX,IAGxC,SAASid,EAAgBv0B,EAASw0B,GAChC,OAAOpwB,EAAEN,YAAY9D,GAAWw0B,EA0BlCx+B,EAAOD,QAAU,CACf+hB,SAxBF,SAAkB9X,EAASsX,EAAYkd,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAAS35B,EARnB45B,EAAa,CACfzW,EACA8V,EACAE,EAAgBz8B,KAAK,KAAM,MAC3By8B,EAAgBz8B,KAAK,KAAM,KAC3By8B,EAAgBz8B,KAAK,KAAM,KAC3B68B,GAIMG,EAAWE,EAAW7d,SAI5B,GAFA9W,GADA00B,EAAUD,EAASz0B,EAASsX,IACV,IAClBvc,EAAS25B,EAAQ,IACNv6B,QAAUo6B,EAAgBx5B,EAAO7D,MAAOs9B,GACjD,OAAOz5B,EAGX,OAAOA,GAOPmjB,IAAKA,EACL8V,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.named-amd.js b/dist/rollbar.named-amd.js index c1dd648b..c997efd6 100644 --- a/dist/rollbar.named-amd.js +++ b/dist/rollbar.named-amd.js @@ -1018,7 +1018,7 @@ module.exports = { "use strict"; -var ErrorStackParser = __webpack_require__(22); +var ErrorStackParser = __webpack_require__(24); var UNKNOWN_FUNCTION = '?'; var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): '); @@ -1354,12 +1354,12 @@ module.exports = rollbar; var Rollbar = __webpack_require__(9); -var telemeter = __webpack_require__(29); -var instrumenter = __webpack_require__(30); -var polyfillJSON = __webpack_require__(33); -var wrapGlobals = __webpack_require__(35); +var telemeter = __webpack_require__(31); +var instrumenter = __webpack_require__(32); +var polyfillJSON = __webpack_require__(35); +var wrapGlobals = __webpack_require__(37); var scrub = __webpack_require__(4); -var truncation = __webpack_require__(36); +var truncation = __webpack_require__(38); Rollbar.setComponents({ telemeter: telemeter, @@ -1389,10 +1389,10 @@ var globals = __webpack_require__(19); var Transport = __webpack_require__(20); var urllib = __webpack_require__(2); -var transforms = __webpack_require__(21); -var sharedTransforms = __webpack_require__(24); -var predicates = __webpack_require__(25); -var sharedPredicates = __webpack_require__(26); +var transforms = __webpack_require__(23); +var sharedTransforms = __webpack_require__(26); +var predicates = __webpack_require__(27); +var sharedPredicates = __webpack_require__(28); var errorParser = __webpack_require__(3); function Rollbar(options, client) { @@ -1921,8 +1921,8 @@ function _gWindow() { return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); } -var defaults = __webpack_require__(27); -var scrubFields = __webpack_require__(28); +var defaults = __webpack_require__(29); +var scrubFields = __webpack_require__(30); var defaultOptions = { version: defaults.version, @@ -2998,6 +2998,7 @@ function getTransportFromOptions(options, defaults, url) { var path = defaults.path; var search = defaults.search; var timeout = options.timeout; + var transport = detectTransport(options) var proxy = options.proxy; if (options.endpoint) { @@ -3015,16 +3016,26 @@ function getTransportFromOptions(options, defaults, url) { port: port, path: path, search: search, - proxy: proxy + proxy: proxy, + transport: transport }; } +function detectTransport(options) { + var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); + var transport = options.defaultTransport || 'xhr'; + if (typeof gWindow.fetch === 'undefined') transport = 'xhr'; + if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch'; + return transport; +} + function transportOptions(transport, method) { var protocol = transport.protocol || 'https:'; var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined); var hostname = transport.hostname; var path = transport.path; var timeout = transport.timeout; + var transportAPI = transport.transport; if (transport.search) { path = path + transport.search; } @@ -3040,7 +3051,8 @@ function transportOptions(transport, method) { hostname: hostname, path: path, port: port, - method: method + method: method, + transport: transportAPI }; } @@ -3242,10 +3254,9 @@ module.exports = { "use strict"; -/*global XDomainRequest*/ - var _ = __webpack_require__(0); -var logger = __webpack_require__(1); +var makeFetchRequest = __webpack_require__(21); +var makeXhrRequest = __webpack_require__(22); /* * accessToken may be embedded in payload but that should not @@ -3257,6 +3268,7 @@ var logger = __webpack_require__(1); * path * port * method + * transport ('xhr' | 'fetch') * } * * params is an object containing key/value pairs. These @@ -3276,7 +3288,9 @@ Transport.prototype.get = function(accessToken, options, params, callback, reque var method = 'GET'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport + ); } Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) { @@ -3301,7 +3315,9 @@ Transport.prototype.post = function(accessToken, options, payload, callback, req var writeData = stringifyResult.value; var method = 'POST'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport + ); } Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) { @@ -3311,7 +3327,9 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa var method = 'POST'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport + ); } @@ -3319,7 +3337,7 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa // so Angular change detection isn't triggered on each API call. // This is the equivalent of runOutsideAngular(). // -function _makeZoneRequest() { +Transport.prototype._makeZoneRequest = function () { var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current; var args = Array.prototype.slice.call(arguments); @@ -3327,10 +3345,24 @@ function _makeZoneRequest() { if (currentZone && currentZone._name === 'angular') { var rootZone = currentZone._parent; rootZone.run(function () { - _makeRequest.apply(undefined, args); + this._makeRequest.apply(undefined, args); }); } else { - _makeRequest.apply(undefined, args); + this._makeRequest.apply(undefined, args); + } +} + +Transport.prototype._makeRequest = function ( + accessToken, url, method, data, callback, requestFactory, timeout, transport +) { + if (typeof RollbarProxy !== 'undefined') { + return _proxyRequest(data, callback); + } + + if (transport === 'fetch') { + makeFetchRequest(accessToken, url, method, data, callback, timeout) + } else { + makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) } } @@ -3346,11 +3378,66 @@ function _proxyRequest(json, callback) { ); } -function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) { - if (typeof RollbarProxy !== 'undefined') { - return _proxyRequest(data, callback); +module.exports = Transport; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); +var _ = __webpack_require__(0); + +function makeFetchRequest(accessToken, url, method, data, callback, timeout) { + var controller; + var timeoutId; + + if(_.isFiniteNumber(timeout)) { + controller = new AbortController(); + timeoutId = setTimeout(() => controller.abort(), timeout); } + fetch(url, { + method: method, + headers: { + 'Content-Type': 'application/json', + 'X-Rollbar-Access-Token': accessToken, + signal: controller && controller.signal + }, + body: data, + }) + .then((response) => { + if (timeoutId) clearTimeout(timeoutId); + return response.json(); + }) + .then((data) => { + callback(null, data); + }) + .catch((error) => { + logger.error(error.message); + callback(error); + }); +} + +module.exports = makeFetchRequest; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/*global XDomainRequest*/ + +var _ = __webpack_require__(0); +var logger = __webpack_require__(1); + +function makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) { var request; if (requestFactory) { request = requestFactory(); @@ -3503,11 +3590,11 @@ function _newRetriableError(message, code) { return err; } -module.exports = Transport; +module.exports = makeXhrRequest; /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3854,7 +3941,7 @@ module.exports = { /***/ }), -/* 22 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -3863,7 +3950,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /* istanbul ignore next */ if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(23)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(25)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -3914,21 +4001,21 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ return filtered.map(function(line) { if (line.indexOf('(eval ') > -1) { // Throw away eval information until we implement stacktrace.js/stackframe#8 - line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, ''); + line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, ''); } - var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '('); + var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, ''); // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in // case it has spaces in it, as the string is split on \s+ later on - var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/); + var location = sanitizedLine.match(/ (\(.+\)$)/); // remove the parenthesized location from the line, if it was matched sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine; - var tokens = sanitizedLine.split(/\s+/).slice(1); - // if a location was matched, pass it to extractLocation() otherwise pop the last token - var locationParts = this.extractLocation(location ? location[1] : tokens.pop()); - var functionName = tokens.join(' ') || undefined; + // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine + // because this line doesn't have function name + var locationParts = this.extractLocation(location ? location[1] : sanitizedLine); + var functionName = location && sanitizedLine || undefined; var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0]; return new StackFrame({ @@ -4061,7 +4148,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 23 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -4209,7 +4296,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 24 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4366,7 +4453,7 @@ module.exports = { /***/ }), -/* 25 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4387,7 +4474,7 @@ module.exports = { /***/ }), -/* 26 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4589,14 +4676,14 @@ module.exports = { /***/ }), -/* 27 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { - version: '2.25.2', + version: '2.26.0', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', @@ -4607,7 +4694,7 @@ module.exports = { /***/ }), -/* 28 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4675,7 +4762,7 @@ module.exports = { /***/ }), -/* 29 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4861,17 +4948,17 @@ module.exports = Telemeter; /***/ }), -/* 30 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(0); -var headers = __webpack_require__(31); +var headers = __webpack_require__(33); var scrub = __webpack_require__(4); var urlparser = __webpack_require__(2); -var domUtil = __webpack_require__(32); +var domUtil = __webpack_require__(34); var defaults = { network: true, @@ -5252,6 +5339,9 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.trackHttpErrors()) { metadata.stack = (new Error()).stack; } + + // Start our handler before returning the promise. This allows resp.clone() + // to execute before other handlers touch the response. return orig.apply(this, args).then(function (resp) { metadata.end_time_ms = _.now(); metadata.status_code = resp.status; @@ -5264,6 +5354,7 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.autoInstrument.networkResponseBody) { if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms // The response must be cloned to prevent reading (and locking) the original stream. + // This must be done before other handlers touch the response. body = resp.clone().text(); //returns a Promise } } @@ -5639,7 +5730,7 @@ module.exports = Instrumenter; /***/ }), -/* 31 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5742,7 +5833,7 @@ module.exports = headers; /***/ }), -/* 32 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5881,19 +5972,19 @@ module.exports = { /***/ }), -/* 33 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var polyfillJSON = __webpack_require__(34); +var polyfillJSON = __webpack_require__(36); module.exports = polyfillJSON; /***/ }), -/* 34 */ +/* 36 */ /***/ (function(module, exports) { // json3.js @@ -6662,7 +6753,7 @@ module.exports = setupCustomJSON; /***/ }), -/* 35 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6712,7 +6803,7 @@ module.exports = wrapGlobals; /***/ }), -/* 36 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/dist/rollbar.named-amd.js.map b/dist/rollbar.named-amd.js.map index 9e22ff50..543c86a7 100644 --- a/dist/rollbar.named-amd.js.map +++ b/dist/rollbar.named-amd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;A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BAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.named-amd.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO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AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.named-amd.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.named-amd.min.js b/dist/rollbar.named-amd.min.js index 59868b2a..23c6e083 100644 --- a/dist/rollbar.named-amd.min.js +++ b/dist/rollbar.named-amd.min.js @@ -1,2 +1,2 @@ -define("rollbar",[],(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(31),i=r(4),s=r(2),a=r(32),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); +define("rollbar",[],(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){this._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout(()=>u.abort(),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then(t=>(c&&clearTimeout(c),t.json())).then(t=>{s(null,t)}).catch(t=>{n.error(t.message),s(t)})}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); //# sourceMappingURL=rollbar.named-amd.min.js.map \ No newline at end of file diff --git a/dist/rollbar.named-amd.min.js.map b/dist/rollbar.named-amd.min.js.map index d8cd1b11..0a403bea 100644 --- a/dist/rollbar.named-amd.min.js.map +++ b/dist/rollbar.named-amd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"mDACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,E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X,OAAOA,GAOPoiB,IAAKA,EACLgW,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.named-amd.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","opts","method","transportAPI","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","makeFetchRequest","makeXhrRequest","requestFactory","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","json","_msg","_proxyRequest","controller","timeoutId","AbortController","abort","headers","signal","response","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","tokens","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"mDACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,I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U84B,EAAmB,IAAKI,EAAUxuB,UAAU1K,UAE5Ek5B,EAAUlW,OAAS2V,EAAaO,EAAUlW,OAAQ,GAC3CkW,EAGT,SAASC,EAAQt0B,EAASsX,GACxB,IAAIxD,EAAO9T,EAAQ3B,KAAKyV,KACxB,GAAIA,EAAKiM,YAEP,IADA,IAAItB,EAAQ3K,EAAKiM,YACR9pB,EAAI,EAAGA,EAAIwoB,EAAM/iB,OAAQzF,IAChCwoB,EAAMxoB,GAAKm+B,EAAkB3V,EAAMxoB,SAE5B6d,EAAK8J,QACd9J,EAAK8J,MAAQwW,EAAkBtgB,EAAK8J,QAEtC,MAAO,CAAC5d,EAASoE,EAAEpK,UAAUgG,EAASsX,IAGxC,SAASid,EAAgBv0B,EAASw0B,GAChC,OAAOpwB,EAAEN,YAAY9D,GAAWw0B,EA0BlCx+B,EAAOD,QAAU,CACf+hB,SAxBF,SAAkB9X,EAASsX,EAAYkd,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAAS35B,EARnB45B,EAAa,CACfzW,EACA8V,EACAE,EAAgBz8B,KAAK,KAAM,MAC3By8B,EAAgBz8B,KAAK,KAAM,KAC3By8B,EAAgBz8B,KAAK,KAAM,KAC3B68B,GAIMG,EAAWE,EAAW7d,SAI5B,GAFA9W,GADA00B,EAAUD,EAASz0B,EAASsX,IACV,IAClBvc,EAAS25B,EAAQ,IACNv6B,QAAUo6B,EAAgBx5B,EAAO7D,MAAOs9B,GACjD,OAAOz5B,EAGX,OAAOA,GAOPmjB,IAAKA,EACL8V,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.named-amd.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.js b/dist/rollbar.noconflict.umd.js index 04f2d956..dbdbf10e 100644 --- a/dist/rollbar.noconflict.umd.js +++ b/dist/rollbar.noconflict.umd.js @@ -1028,7 +1028,7 @@ module.exports = { "use strict"; -var ErrorStackParser = __webpack_require__(22); +var ErrorStackParser = __webpack_require__(24); var UNKNOWN_FUNCTION = '?'; var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): '); @@ -1349,12 +1349,12 @@ module.exports = rollbar; var Rollbar = __webpack_require__(9); -var telemeter = __webpack_require__(29); -var instrumenter = __webpack_require__(30); -var polyfillJSON = __webpack_require__(33); -var wrapGlobals = __webpack_require__(35); +var telemeter = __webpack_require__(31); +var instrumenter = __webpack_require__(32); +var polyfillJSON = __webpack_require__(35); +var wrapGlobals = __webpack_require__(37); var scrub = __webpack_require__(4); -var truncation = __webpack_require__(36); +var truncation = __webpack_require__(38); Rollbar.setComponents({ telemeter: telemeter, @@ -1384,10 +1384,10 @@ var globals = __webpack_require__(19); var Transport = __webpack_require__(20); var urllib = __webpack_require__(2); -var transforms = __webpack_require__(21); -var sharedTransforms = __webpack_require__(24); -var predicates = __webpack_require__(25); -var sharedPredicates = __webpack_require__(26); +var transforms = __webpack_require__(23); +var sharedTransforms = __webpack_require__(26); +var predicates = __webpack_require__(27); +var sharedPredicates = __webpack_require__(28); var errorParser = __webpack_require__(3); function Rollbar(options, client) { @@ -1916,8 +1916,8 @@ function _gWindow() { return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); } -var defaults = __webpack_require__(27); -var scrubFields = __webpack_require__(28); +var defaults = __webpack_require__(29); +var scrubFields = __webpack_require__(30); var defaultOptions = { version: defaults.version, @@ -2993,6 +2993,7 @@ function getTransportFromOptions(options, defaults, url) { var path = defaults.path; var search = defaults.search; var timeout = options.timeout; + var transport = detectTransport(options) var proxy = options.proxy; if (options.endpoint) { @@ -3010,16 +3011,26 @@ function getTransportFromOptions(options, defaults, url) { port: port, path: path, search: search, - proxy: proxy + proxy: proxy, + transport: transport }; } +function detectTransport(options) { + var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); + var transport = options.defaultTransport || 'xhr'; + if (typeof gWindow.fetch === 'undefined') transport = 'xhr'; + if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch'; + return transport; +} + function transportOptions(transport, method) { var protocol = transport.protocol || 'https:'; var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined); var hostname = transport.hostname; var path = transport.path; var timeout = transport.timeout; + var transportAPI = transport.transport; if (transport.search) { path = path + transport.search; } @@ -3035,7 +3046,8 @@ function transportOptions(transport, method) { hostname: hostname, path: path, port: port, - method: method + method: method, + transport: transportAPI }; } @@ -3237,10 +3249,9 @@ module.exports = { "use strict"; -/*global XDomainRequest*/ - var _ = __webpack_require__(0); -var logger = __webpack_require__(1); +var makeFetchRequest = __webpack_require__(21); +var makeXhrRequest = __webpack_require__(22); /* * accessToken may be embedded in payload but that should not @@ -3252,6 +3263,7 @@ var logger = __webpack_require__(1); * path * port * method + * transport ('xhr' | 'fetch') * } * * params is an object containing key/value pairs. These @@ -3271,7 +3283,9 @@ Transport.prototype.get = function(accessToken, options, params, callback, reque var method = 'GET'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport + ); } Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) { @@ -3296,7 +3310,9 @@ Transport.prototype.post = function(accessToken, options, payload, callback, req var writeData = stringifyResult.value; var method = 'POST'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport + ); } Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) { @@ -3306,7 +3322,9 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa var method = 'POST'; var url = _.formatUrl(options); - _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout); + this._makeZoneRequest( + accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport + ); } @@ -3314,7 +3332,7 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa // so Angular change detection isn't triggered on each API call. // This is the equivalent of runOutsideAngular(). // -function _makeZoneRequest() { +Transport.prototype._makeZoneRequest = function () { var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self); var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current; var args = Array.prototype.slice.call(arguments); @@ -3322,10 +3340,24 @@ function _makeZoneRequest() { if (currentZone && currentZone._name === 'angular') { var rootZone = currentZone._parent; rootZone.run(function () { - _makeRequest.apply(undefined, args); + this._makeRequest.apply(undefined, args); }); } else { - _makeRequest.apply(undefined, args); + this._makeRequest.apply(undefined, args); + } +} + +Transport.prototype._makeRequest = function ( + accessToken, url, method, data, callback, requestFactory, timeout, transport +) { + if (typeof RollbarProxy !== 'undefined') { + return _proxyRequest(data, callback); + } + + if (transport === 'fetch') { + makeFetchRequest(accessToken, url, method, data, callback, timeout) + } else { + makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) } } @@ -3341,11 +3373,66 @@ function _proxyRequest(json, callback) { ); } -function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) { - if (typeof RollbarProxy !== 'undefined') { - return _proxyRequest(data, callback); +module.exports = Transport; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); +var _ = __webpack_require__(0); + +function makeFetchRequest(accessToken, url, method, data, callback, timeout) { + var controller; + var timeoutId; + + if(_.isFiniteNumber(timeout)) { + controller = new AbortController(); + timeoutId = setTimeout(() => controller.abort(), timeout); } + fetch(url, { + method: method, + headers: { + 'Content-Type': 'application/json', + 'X-Rollbar-Access-Token': accessToken, + signal: controller && controller.signal + }, + body: data, + }) + .then((response) => { + if (timeoutId) clearTimeout(timeoutId); + return response.json(); + }) + .then((data) => { + callback(null, data); + }) + .catch((error) => { + logger.error(error.message); + callback(error); + }); +} + +module.exports = makeFetchRequest; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/*global XDomainRequest*/ + +var _ = __webpack_require__(0); +var logger = __webpack_require__(1); + +function makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) { var request; if (requestFactory) { request = requestFactory(); @@ -3498,11 +3585,11 @@ function _newRetriableError(message, code) { return err; } -module.exports = Transport; +module.exports = makeXhrRequest; /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3849,7 +3936,7 @@ module.exports = { /***/ }), -/* 22 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -3858,7 +3945,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /* istanbul ignore next */ if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(23)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(25)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -3909,21 +3996,21 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ return filtered.map(function(line) { if (line.indexOf('(eval ') > -1) { // Throw away eval information until we implement stacktrace.js/stackframe#8 - line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, ''); + line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, ''); } - var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '('); + var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, ''); // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in // case it has spaces in it, as the string is split on \s+ later on - var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/); + var location = sanitizedLine.match(/ (\(.+\)$)/); // remove the parenthesized location from the line, if it was matched sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine; - var tokens = sanitizedLine.split(/\s+/).slice(1); - // if a location was matched, pass it to extractLocation() otherwise pop the last token - var locationParts = this.extractLocation(location ? location[1] : tokens.pop()); - var functionName = tokens.join(' ') || undefined; + // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine + // because this line doesn't have function name + var locationParts = this.extractLocation(location ? location[1] : sanitizedLine); + var functionName = location && sanitizedLine || undefined; var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0]; return new StackFrame({ @@ -4056,7 +4143,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 23 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -4204,7 +4291,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 24 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4361,7 +4448,7 @@ module.exports = { /***/ }), -/* 25 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4382,7 +4469,7 @@ module.exports = { /***/ }), -/* 26 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4584,14 +4671,14 @@ module.exports = { /***/ }), -/* 27 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { - version: '2.25.2', + version: '2.26.0', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', @@ -4602,7 +4689,7 @@ module.exports = { /***/ }), -/* 28 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4670,7 +4757,7 @@ module.exports = { /***/ }), -/* 29 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4856,17 +4943,17 @@ module.exports = Telemeter; /***/ }), -/* 30 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(0); -var headers = __webpack_require__(31); +var headers = __webpack_require__(33); var scrub = __webpack_require__(4); var urlparser = __webpack_require__(2); -var domUtil = __webpack_require__(32); +var domUtil = __webpack_require__(34); var defaults = { network: true, @@ -5247,6 +5334,9 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.trackHttpErrors()) { metadata.stack = (new Error()).stack; } + + // Start our handler before returning the promise. This allows resp.clone() + // to execute before other handlers touch the response. return orig.apply(this, args).then(function (resp) { metadata.end_time_ms = _.now(); metadata.status_code = resp.status; @@ -5259,6 +5349,7 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.autoInstrument.networkResponseBody) { if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms // The response must be cloned to prevent reading (and locking) the original stream. + // This must be done before other handlers touch the response. body = resp.clone().text(); //returns a Promise } } @@ -5634,7 +5725,7 @@ module.exports = Instrumenter; /***/ }), -/* 31 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5737,7 +5828,7 @@ module.exports = headers; /***/ }), -/* 32 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5876,19 +5967,19 @@ module.exports = { /***/ }), -/* 33 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var polyfillJSON = __webpack_require__(34); +var polyfillJSON = __webpack_require__(36); module.exports = polyfillJSON; /***/ }), -/* 34 */ +/* 36 */ /***/ (function(module, exports) { // json3.js @@ -6657,7 +6748,7 @@ module.exports = setupCustomJSON; /***/ }), -/* 35 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6707,7 +6798,7 @@ module.exports = wrapGlobals; /***/ }), -/* 36 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/dist/rollbar.noconflict.umd.js.map b/dist/rollbar.noconflict.umd.js.map index d7e855b2..335d9de9 100644 --- a/dist/rollbar.noconflict.umd.js.map +++ b/dist/rollbar.noconflict.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;;;;;;;;ACRa;;AAEb,cAAc,mBAAO,CAAC,CAAQ;AAC9B,gBAAgB,mBAAO,CAAC,EAAc;AACtC,mBAAmB,mBAAO,CAAC,EAAa;AACxC,mBAAmB,mBAAO,CAAC,EAAyB;AACpD,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,CAAU;AAC9B,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACnBa;;AAEb,aAAa,mBAAO,CAAC,EAAY;AACjC,QAAQ,mBAAO,CAAC,CAAY;AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.noconflict.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;A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ACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.noconflict.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.min.js b/dist/rollbar.noconflict.umd.min.js index e5d76abf..a2a538d8 100644 --- a/dist/rollbar.noconflict.umd.min.js +++ b/dist/rollbar.noconflict.umd.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(31),i=r(4),s=r(2),a=r(32),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){this._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout(()=>u.abort(),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then(t=>(c&&clearTimeout(c),t.json())).then(t=>{s(null,t)}).catch(t=>{n.error(t.message),s(t)})}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); //# sourceMappingURL=rollbar.noconflict.umd.min.js.map \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.min.js.map b/dist/rollbar.noconflict.umd.min.js.map index 205c6514..9cd5aa9d 100644 --- a/dist/rollbar.noconflict.umd.min.js.map +++ b/dist/rollbar.noconflict.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarStartTime","getTime","Rollbar","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","self","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAStB,GACX,oBAAXuB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAenB,EAASuB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAenB,EAAS,aAAc,CAAEyB,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY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kV,KACxB,GAAIA,EAAKkL,YAEP,IADA,IAAItB,EAAQ5J,EAAKkL,YACRxoB,EAAI,EAAGA,EAAIknB,EAAMzhB,OAAQzF,IAChCknB,EAAMlnB,GAAK+8B,EAAkB7V,EAAMlnB,SAE5Bsd,EAAK+I,QACd/I,EAAK+I,MAAQ0W,EAAkBzf,EAAK+I,QAEtC,MAAO,CAACtc,EAASoE,EAAEpK,UAAUgG,EAAS+W,IAGxC,SAASoc,EAAgBnzB,EAASozB,GAChC,OAAOhvB,EAAEN,YAAY9D,GAAWozB,EA0BlC19B,EAAOD,QAAU,CACf8hB,SAxBF,SAAkBvX,EAAS+W,EAAYqc,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAASv4B,EARnBw4B,EAAa,CACf3W,EACAgW,EACAE,EAAgBr7B,KAAK,KAAM,MAC3Bq7B,EAAgBr7B,KAAK,KAAM,KAC3Bq7B,EAAgBr7B,KAAK,KAAM,KAC3By7B,GAIMG,EAAWE,EAAWhd,SAI5B,GAFAvW,GADAszB,EAAUD,EAASrzB,EAAS+W,IACV,IAClBhc,EAASu4B,EAAQ,IACNn5B,QAAUg5B,EAAgBp4B,EAAO7D,MAAOk8B,GACjD,OAAOr4B,EAGX,OAAOA,GAOP6hB,IAAKA,EACLgW,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.noconflict.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarStartTime","getTime","Rollbar","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","self","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","opts","method","transportAPI","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","makeFetchRequest","makeXhrRequest","requestFactory","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","json","_msg","_proxyRequest","controller","timeoutId","AbortController","abort","headers","signal","response","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","tokens","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,S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KiM,YAEP,IADA,IAAItB,EAAQ3K,EAAKiM,YACRvpB,EAAI,EAAGA,EAAIioB,EAAMxiB,OAAQzF,IAChCioB,EAAMjoB,GAAK49B,EAAkB3V,EAAMjoB,SAE5Bsd,EAAK8J,QACd9J,EAAK8J,MAAQwW,EAAkBtgB,EAAK8J,QAEtC,MAAO,CAACrd,EAASoE,EAAEpK,UAAUgG,EAAS+W,IAGxC,SAASid,EAAgBh0B,EAASi0B,GAChC,OAAO7vB,EAAEN,YAAY9D,GAAWi0B,EA0BlCv+B,EAAOD,QAAU,CACf8hB,SAxBF,SAAkBvX,EAAS+W,EAAYkd,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAASp5B,EARnBq5B,EAAa,CACfzW,EACA8V,EACAE,EAAgBl8B,KAAK,KAAM,MAC3Bk8B,EAAgBl8B,KAAK,KAAM,KAC3Bk8B,EAAgBl8B,KAAK,KAAM,KAC3Bs8B,GAIMG,EAAWE,EAAW7d,SAI5B,GAFAvW,GADAm0B,EAAUD,EAASl0B,EAAS+W,IACV,IAClBhc,EAASo5B,EAAQ,IACNh6B,QAAU65B,EAAgBj5B,EAAO7D,MAAO+8B,GACjD,OAAOl5B,EAGX,OAAOA,GAOP4iB,IAAKA,EACL8V,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.noconflict.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.snippet.js b/dist/rollbar.snippet.js index c55e7c2c..dbac61fb 100644 --- a/dist/rollbar.snippet.js +++ b/dist/rollbar.snippet.js @@ -1 +1 @@ -!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.25.2/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i controller.abort(), timeout); } + fetch(url, { + method: method, + headers: { + 'Content-Type': 'application/json', + 'X-Rollbar-Access-Token': accessToken, + signal: controller && controller.signal + }, + body: data, + }) + .then((response) => { + if (timeoutId) clearTimeout(timeoutId); + return response.json(); + }) + .then((data) => { + callback(null, data); + }) + .catch((error) => { + logger.error(error.message); + callback(error); + }); +} + +module.exports = makeFetchRequest; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/*global XDomainRequest*/ + +var _ = __webpack_require__(0); +var logger = __webpack_require__(1); + +function makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) { var request; if (requestFactory) { request = requestFactory(); @@ -3513,11 +3600,11 @@ function _newRetriableError(message, code) { return err; } -module.exports = Transport; +module.exports = makeXhrRequest; /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3864,7 +3951,7 @@ module.exports = { /***/ }), -/* 22 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -3873,7 +3960,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /* istanbul ignore next */ if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(23)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(25)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -3924,21 +4011,21 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ return filtered.map(function(line) { if (line.indexOf('(eval ') > -1) { // Throw away eval information until we implement stacktrace.js/stackframe#8 - line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, ''); + line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, ''); } - var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '('); + var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, ''); // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in // case it has spaces in it, as the string is split on \s+ later on - var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/); + var location = sanitizedLine.match(/ (\(.+\)$)/); // remove the parenthesized location from the line, if it was matched sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine; - var tokens = sanitizedLine.split(/\s+/).slice(1); - // if a location was matched, pass it to extractLocation() otherwise pop the last token - var locationParts = this.extractLocation(location ? location[1] : tokens.pop()); - var functionName = tokens.join(' ') || undefined; + // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine + // because this line doesn't have function name + var locationParts = this.extractLocation(location ? location[1] : sanitizedLine); + var functionName = location && sanitizedLine || undefined; var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0]; return new StackFrame({ @@ -4071,7 +4158,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 23 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) { @@ -4219,7 +4306,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 24 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4376,7 +4463,7 @@ module.exports = { /***/ }), -/* 25 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4397,7 +4484,7 @@ module.exports = { /***/ }), -/* 26 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4599,14 +4686,14 @@ module.exports = { /***/ }), -/* 27 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { - version: '2.25.2', + version: '2.26.0', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', @@ -4617,7 +4704,7 @@ module.exports = { /***/ }), -/* 28 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4685,7 +4772,7 @@ module.exports = { /***/ }), -/* 29 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4871,17 +4958,17 @@ module.exports = Telemeter; /***/ }), -/* 30 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(0); -var headers = __webpack_require__(31); +var headers = __webpack_require__(33); var scrub = __webpack_require__(4); var urlparser = __webpack_require__(2); -var domUtil = __webpack_require__(32); +var domUtil = __webpack_require__(34); var defaults = { network: true, @@ -5262,6 +5349,9 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.trackHttpErrors()) { metadata.stack = (new Error()).stack; } + + // Start our handler before returning the promise. This allows resp.clone() + // to execute before other handlers touch the response. return orig.apply(this, args).then(function (resp) { metadata.end_time_ms = _.now(); metadata.status_code = resp.status; @@ -5274,6 +5364,7 @@ Instrumenter.prototype.instrumentNetwork = function() { if (self.autoInstrument.networkResponseBody) { if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms // The response must be cloned to prevent reading (and locking) the original stream. + // This must be done before other handlers touch the response. body = resp.clone().text(); //returns a Promise } } @@ -5649,7 +5740,7 @@ module.exports = Instrumenter; /***/ }), -/* 31 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5752,7 +5843,7 @@ module.exports = headers; /***/ }), -/* 32 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5891,19 +5982,19 @@ module.exports = { /***/ }), -/* 33 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var polyfillJSON = __webpack_require__(34); +var polyfillJSON = __webpack_require__(36); module.exports = polyfillJSON; /***/ }), -/* 34 */ +/* 36 */ /***/ (function(module, exports) { // json3.js @@ -6672,7 +6763,7 @@ module.exports = setupCustomJSON; /***/ }), -/* 35 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6722,7 +6813,7 @@ module.exports = wrapGlobals; /***/ }), -/* 36 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/dist/rollbar.umd.js.map b/dist/rollbar.umd.js.map index a793e2c7..e3279e31 100644 --- a/dist/rollbar.umd.js.map +++ b/dist/rollbar.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB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ACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;;;;;;;ACvBa;;AAEb,cAAc,mBAAO,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;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.umd.min.js b/dist/rollbar.umd.min.js index dd782e80..3d7d313d 100644 --- a/dist/rollbar.umd.min.js +++ b/dist/rollbar.umd.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(31),i=r(4),s=r(2),a=r(32),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){this._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout(()=>u.abort(),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then(t=>(c&&clearTimeout(c),t.json())).then(t=>{s(null,t)}).catch(t=>{n.error(t.message),s(t)})}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); //# sourceMappingURL=rollbar.umd.min.js.map \ No newline at end of file diff --git a/dist/rollbar.umd.min.js.map b/dist/rollbar.umd.min.js.map index 0de896b0..d164e02b 100644 --- a/dist/rollbar.umd.min.js.map +++ b/dist/rollbar.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,O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B,IAAKI,EAAU1tB,UAAU1K,UAE5Eo4B,EAAUpW,OAAS6V,EAAaO,EAAUpW,OAAQ,GAC3CoW,EAGT,SAASC,EAAQxzB,EAASqX,GACxB,IAAIxD,EAAO7T,EAAQ3B,KAAKwV,KACxB,GAAIA,EAAKkL,YAEP,IADA,IAAItB,EAAQ5J,EAAKkL,YACR9oB,EAAI,EAAGA,EAAIwnB,EAAM/hB,OAAQzF,IAChCwnB,EAAMxnB,GAAKq9B,EAAkB7V,EAAMxnB,SAE5B4d,EAAK+I,QACd/I,EAAK+I,MAAQ0W,EAAkBzf,EAAK+I,QAEtC,MAAO,CAAC5c,EAASoE,EAAEpK,UAAUgG,EAASqX,IAGxC,SAASoc,EAAgBzzB,EAAS0zB,GAChC,OAAOtvB,EAAEN,YAAY9D,GAAW0zB,EA0BlCh+B,EAAOD,QAAU,CACfoiB,SAxBF,SAAkB7X,EAASqX,EAAYqc,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAAS74B,EARnB84B,EAAa,CACf3W,EACAgW,EACAE,EAAgB37B,KAAK,KAAM,MAC3B27B,EAAgB37B,KAAK,KAAM,KAC3B27B,EAAgB37B,KAAK,KAAM,KAC3B+7B,GAIMG,EAAWE,EAAWhd,SAI5B,GAFA7W,GADA4zB,EAAUD,EAAS3zB,EAASqX,IACV,IAClBtc,EAAS64B,EAAQ,IACNz5B,QAAUs5B,EAAgB14B,EAAO7D,MAAOw8B,GACjD,OAAO34B,EAGX,OAAOA,GAOPmiB,IAAKA,EACLgW,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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, '(');\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(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.25.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","cause","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","setTimeout","post","stringifyResult","truncate","contextResult","timeout","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","opts","method","transportAPI","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","makeFetchRequest","makeXhrRequest","requestFactory","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","json","_msg","_proxyRequest","controller","timeoutId","AbortController","abort","headers","signal","response","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","requestInfo","query_string","remoteString","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","tokens","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","normalizeName","FetchHeaders","forEach","append","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANA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AAGA,EAAIuoB,EAAM9iB,OAAQzF,IAChCuoB,EAAMvoB,GAAKk+B,EAAkB3V,EAAMvoB,SAE5B4d,EAAK8J,QACd9J,EAAK8J,MAAQwW,EAAkBtgB,EAAK8J,QAEtC,MAAO,CAAC3d,EAASoE,EAAEpK,UAAUgG,EAASqX,IAGxC,SAASid,EAAgBt0B,EAASu0B,GAChC,OAAOnwB,EAAEN,YAAY9D,GAAWu0B,EA0BlC7+B,EAAOD,QAAU,CACfoiB,SAxBF,SAAkB7X,EAASqX,EAAYkd,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAAS15B,EARnB25B,EAAa,CACfzW,EACA8V,EACAE,EAAgBx8B,KAAK,KAAM,MAC3Bw8B,EAAgBx8B,KAAK,KAAM,KAC3Bw8B,EAAgBx8B,KAAK,KAAM,KAC3B48B,GAIMG,EAAWE,EAAW7d,SAI5B,GAFA7W,GADAy0B,EAAUD,EAASx0B,EAASqX,IACV,IAClBtc,EAAS05B,EAAQ,IACNt6B,QAAUm6B,EAAgBv5B,EAAO7D,MAAOq9B,GACjD,OAAOx5B,EAGX,OAAOA,GAOPkjB,IAAKA,EACL8V,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n this._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(() => controller.abort(), timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then((response) => {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then((data) => {\n callback(null, data);\n })\n .catch((error) => {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\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', ''].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(//, '$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","(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","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\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\nFetchHeaders.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\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.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\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/browser_extension/background.js b/examples/browser_extension/background.js index 21407e39..c50a8495 100644 --- a/examples/browser_extension/background.js +++ b/examples/browser_extension/background.js @@ -11,7 +11,7 @@ var _rollbarConfig = { }; // Rollbar Snippet -!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.25.2/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i diff --git a/examples/snippet.html b/examples/snippet.html index aad82dca..67074bef 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index fc17acd8..59c3ed23 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 92bc50b3..626ca49d 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -15,7 +15,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index be450bb9..8b5f3a8c 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@