From 35ccbbc9a834954e8bea0281ba882009b3060a07 Mon Sep 17 00:00:00 2001 From: Andrew Weiss Date: Tue, 19 Sep 2017 09:15:46 -0700 Subject: [PATCH] Release v2.2.8 --- CHANGELOG.md | 7 + README.md | 4 +- dist/rollbar.js | 348 +++++++++++++------------- dist/rollbar.js.map | 2 +- dist/rollbar.min.js | 4 +- dist/rollbar.named-amd.js | 348 +++++++++++++------------- dist/rollbar.named-amd.js.map | 2 +- dist/rollbar.named-amd.min.js | 4 +- dist/rollbar.noconflict.umd.js | 356 ++++++++++++++------------- dist/rollbar.noconflict.umd.js.map | 2 +- dist/rollbar.noconflict.umd.min.js | 4 +- dist/rollbar.snippet.js | 2 +- dist/rollbar.umd.js | 356 ++++++++++++++------------- dist/rollbar.umd.js.map | 2 +- dist/rollbar.umd.min.js | 4 +- examples/itemsPerMinute.html | 2 +- examples/no-conflict/test.html | 2 +- examples/snippet.html | 2 +- examples/test.html | 2 +- examples/universal-browser/test.html | 2 +- package.json | 2 +- 21 files changed, 768 insertions(+), 689 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a67c02952..d9e36adbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## v2.2.8 + +- Stop polluting the global namespace in the umd build +- Don't use the maxItems configuration option on the server side +- Fix the way telementry dom elements are truncated +- Fix some typescript declaration issues + ## v2.2.7 - Ensure scrubbing has the right value for telemetry inputs if `scrubTelemetryInputs` is true. - Fix memory leak related to network requests diff --git a/README.md b/README.md index 693bd6e0d..0f044a527 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Rollbar notifier for JavaScript [![Build Status](https://api.travis-ci.org/rollbar/rollbar.js.png?branch=v2.2.7)](https://travis-ci.org/rollbar/rollbar.js) +# Rollbar notifier for JavaScript [![Build Status](https://api.travis-ci.org/rollbar/rollbar.js.png?branch=v2.2.8)](https://travis-ci.org/rollbar/rollbar.js) @@ -22,7 +22,7 @@ var _rollbarConfig = { } }; // Rollbar Snippet -!function(r){function o(n){if(e[n])return e[n].exports;var t=e[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o,e){"use strict";var n=e(1),t=e(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.2.7/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,o,e){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,o){this.options=r,this._rollbarOldOnError=null;var e=s++;this.shimId=function(){return e},window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}function a(r,o){var e=o.globalAlias||"Rollbar";if("object"==typeof r[e])return r[e];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(o);return n(function(){o.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),o.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=o.autoInstrument;return(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[e]=t,t})()}function l(r){return n(function(){var o=this,e=Array.prototype.slice.call(arguments,0),n={shim:o,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=e(2),s=0,d=e(3),c=function(r,o){return new t(r,o)},p=d.bind(null,c);t.prototype.loadFull=function(r,o,e,t,a){var l=function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,t,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(t=n.args||[],i=0;i ``` diff --git a/dist/rollbar.js b/dist/rollbar.js index 21974f52e..f3a8801ae 100644 --- a/dist/rollbar.js +++ b/dist/rollbar.js @@ -462,7 +462,7 @@ /* global __DEFAULT_ENDPOINT__:false */ var defaultOptions = { - version: ("2.2.7"), + version: ("2.2.8"), scrubFields: (["pw","pass","passwd","password","secret","confirm_password","confirmPassword","password_confirmation","passwordConfirmation","access_token","accessToken","secret_key","secretKey","secretToken"]), logLevel: ("debug"), reportLevel: ("debug"), @@ -1028,10 +1028,10 @@ __initRollbarJSON = true; if (isDefined(JSON)) { - if (isFunction(JSON.stringify)) { + if (isNativeFunction(JSON.stringify)) { RollbarJSON.stringify = JSON.stringify; } - if (isFunction(JSON.parse)) { + if (isNativeFunction(JSON.parse)) { RollbarJSON.parse = JSON.parse; } } @@ -1090,6 +1090,30 @@ return isType(f, 'function'); } + /* isNativeFunction - a convenience function for checking if a value is a native JS function + * + * @param f - any value + * @returns true if f is a native JS function, otherwise false + */ + function isNativeFunction(f) { + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty) + .replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?'); + var reIsNative = RegExp('^' + funcMatchString + '$'); + return isObject(f) && reIsNative.test(f); + } + + /* isObject - Checks if the argument is an object + * + * @param value - any value + * @returns true is value is an object function is an object) + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + /* * isDefined - a convenience function for checking if a value is not equal to undefined * @@ -1588,6 +1612,7 @@ isType: isType, typeName: typeName, isFunction: isFunction, + isNativeFunction: isNativeFunction, isIterable: isIterable, isError: isError, extend: extend, @@ -4139,6 +4164,9 @@ if (item._isUncaught) { data._isUncaught = true; } + if (item._originalArgs) { + data._originalArgs = item._originalArgs; + } callback(null, data); } @@ -4344,6 +4372,7 @@ var _ = __webpack_require__(5); var urlparser = __webpack_require__(17); + var domUtil = __webpack_require__(25); var defaults = { network: true, @@ -4371,7 +4400,7 @@ function Instrumenter(options, telemeter, rollbar, _window, _document) { var autoInstrument = options.autoInstrument; - if (autoInstrument === false) { + if (options.enabled === false || autoInstrument === false) { this.autoInstrument = {}; } else { if (!_.isType(autoInstrument, 'object')) { @@ -4403,7 +4432,7 @@ Instrumenter.prototype.configure = function(options) { var autoInstrument = options.autoInstrument; var oldSettings = _.extend(true, {}, this.autoInstrument); - if (autoInstrument === false) { + if (options.enabled === false || autoInstrument === false) { this.autoInstrument = {}; } else { if (!_.isType(autoInstrument, 'object')) { @@ -4621,12 +4650,12 @@ Instrumenter.prototype.handleClick = function(evt) { try { - var e = getElementFromEvent(evt, this._document); + var e = domUtil.getElementFromEvent(evt, this._document); var hasTag = e && e.tagName; - var anchorOrButton = isDescribedElement(e, 'a') || isDescribedElement(e, 'button'); - if (hasTag && (anchorOrButton || isDescribedElement(e, 'input', ['button', 'submit']))) { + var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button'); + if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) { this.captureDomEvent('click', e); - } else if (isDescribedElement(e, 'input', ['checkbox', 'radio'])) { + } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) { this.captureDomEvent('input', e, e.value, e.checked); } } catch (exc) { @@ -4636,13 +4665,13 @@ Instrumenter.prototype.handleBlur = function(evt) { try { - var e = getElementFromEvent(evt, this._document); + var e = domUtil.getElementFromEvent(evt, this._document); if (e && e.tagName) { - if (isDescribedElement(e, 'textarea')) { + if (domUtil.isDescribedElement(e, 'textarea')) { this.captureDomEvent('input', e, e.value); - } else if (isDescribedElement(e, 'select') && e.options && e.options.length) { + } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) { this.handleSelectInputChanged(e); - } else if (isDescribedElement(e, 'input') && !isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) { + } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) { this.captureDomEvent('input', e, e.value); } } @@ -4665,168 +4694,19 @@ Instrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) { if (value !== undefined) { - if (this.scrubTelemetryInputs || (getElementType(element) === 'password')) { + if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) { value = '[scrubbed]'; } else if (this.telemetryScrubber) { - var description = describeElement(element); + var description = domUtil.describeElement(element); if (this.telemetryScrubber(description)) { value = '[scrubbed]'; } } } - var elementString = elementArrayToString(treeToArray(element)); + var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element)); this.telemeter.captureDom(subtype, elementString, value, isChecked); }; - function getElementType(e) { - return (e.getAttribute('type') || '').toLowerCase(); - } - - function isDescribedElement(element, type, subtypes) { - if (element.tagName.toLowerCase() !== type.toLowerCase()) { - return false; - } - if (!subtypes) { - return true; - } - element = getElementType(element); - for (var i = 0; i < subtypes.length; i++) { - if (subtypes[i] === element) { - return true; - } - } - return false; - } - - function getElementFromEvent(evt, doc) { - if (evt.target) { - return evt.target; - } - if (doc && doc.elementFromPoint) { - return doc.elementFromPoint(evt.clientX, evt.clientY); - } - return undefined; - } - - function treeToArray(elem) { - var MAX_HEIGHT = 5; - var out = []; - var nextDescription; - for (var height = 0; elem && height < MAX_HEIGHT; height++) { - nextDescription = describeElement(elem); - if (nextDescription.tagName === 'html') { - break; - } - out.push(nextDescription); - elem = elem.parentNode; - } - return out.reverse(); - } - - function elementArrayToString(a) { - var MAX_LENGTH = 80; - var separator = ' > ', separatorLength = separator.length; - var out = [], len = 0, nextStr, totalLength; - - for (var i = 0; i < a.length; i++) { - nextStr = descriptionToString(a[i]); - totalLength = len + (out.length * separatorLength) + nextStr.length; - if (i > 0 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - } - return out.join(separator); - } - - /** - * Old implementation - * Should be equivalent to: elementArrayToString(treeToArray(elem)) - function treeToString(elem) { - var MAX_HEIGHT = 5, MAX_LENGTH = 80; - var separator = ' > ', separatorLength = separator.length; - var out = [], len = 0, nextStr, totalLength; - - for (var height = 0; elem && height < MAX_HEIGHT; height++) { - nextStr = elementToString(elem); - if (nextStr === 'html') { - break; - } - totalLength = len + (out.length * separatorLength) + nextStr.length; - if (height > 1 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - elem = elem.parentNode; - } - return out.reverse().join(separator); - } - - function elementToString(elem) { - return descriptionToString(describeElement(elem)); - } - */ - - function descriptionToString(desc) { - if (!desc || !desc.tagName) { - return ''; - } - var out = [desc.tagName]; - if (desc.id) { - out.push('#' + desc.id); - } - if (desc.classes) { - out.push('.' + desc.classes.join('.')); - } - for (var i = 0; i < desc.attributes.length; i++) { - out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); - } - - return out.join(''); - } - - /** - * Input: a dom element - * Output: null if tagName is falsey or input is falsey, else - * { - * tagName: String, - * id: String | undefined, - * classes: [String] | undefined, - * attributes: [ - * { - * key: OneOf(type, name, title, alt), - * value: String - * } - * ] - * } - */ - function describeElement(elem) { - if (!elem || !elem.tagName) { - return null; - } - var out = {}, className, key, attr, i; - out.tagName = elem.tagName.toLowerCase(); - if (elem.id) { - out.id = elem.id; - } - className = elem.className; - if (className && _.isType(className, 'string')) { - out.classes = className.split(/\s+/); - } - var attributes = ['type', 'name', 'title', 'alt']; - out.attributes = []; - for (i = 0; i < attributes.length; i++) { - key = attributes[i]; - attr = elem.getAttribute(key); - if (attr) { - out.attributes.push({key: key, value: attr}); - } - } - return out; - } - Instrumenter.prototype.deinstrumentNavigation = function() { var chrome = this._window.chrome; var chromePackagedApp = chrome && chrome.app && chrome.app.runtime; @@ -4950,5 +4830,143 @@ module.exports = Instrumenter; +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + + 'use strict'; + + function getElementType(e) { + return (e.getAttribute('type') || '').toLowerCase(); + } + + function isDescribedElement(element, type, subtypes) { + if (element.tagName.toLowerCase() !== type.toLowerCase()) { + return false; + } + if (!subtypes) { + return true; + } + element = getElementType(element); + for (var i = 0; i < subtypes.length; i++) { + if (subtypes[i] === element) { + return true; + } + } + return false; + } + + function getElementFromEvent(evt, doc) { + if (evt.target) { + return evt.target; + } + if (doc && doc.elementFromPoint) { + return doc.elementFromPoint(evt.clientX, evt.clientY); + } + return undefined; + } + + function treeToArray(elem) { + var MAX_HEIGHT = 5; + var out = []; + var nextDescription; + for (var height = 0; elem && height < MAX_HEIGHT; height++) { + nextDescription = describeElement(elem); + if (nextDescription.tagName === 'html') { + break; + } + out.unshift(nextDescription); + elem = elem.parentNode; + } + return out; + } + + function elementArrayToString(a) { + var MAX_LENGTH = 80; + var separator = ' > ', separatorLength = separator.length; + var out = [], len = 0, nextStr, totalLength; + + for (var i = a.length - 1; i >= 0; i--) { + nextStr = descriptionToString(a[i]); + totalLength = len + (out.length * separatorLength) + nextStr.length; + if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) { + out.unshift('...'); + break; + } + out.unshift(nextStr); + len += nextStr.length; + } + return out.join(separator); + } + + function descriptionToString(desc) { + if (!desc || !desc.tagName) { + return ''; + } + var out = [desc.tagName]; + if (desc.id) { + out.push('#' + desc.id); + } + if (desc.classes) { + out.push('.' + desc.classes.join('.')); + } + for (var i = 0; i < desc.attributes.length; i++) { + out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); + } + + return out.join(''); + } + + /** + * Input: a dom element + * Output: null if tagName is falsey or input is falsey, else + * { + * tagName: String, + * id: String | undefined, + * classes: [String] | undefined, + * attributes: [ + * { + * key: OneOf(type, name, title, alt), + * value: String + * } + * ] + * } + */ + function describeElement(elem) { + if (!elem || !elem.tagName) { + return null; + } + var out = {}, className, key, attr, i; + out.tagName = elem.tagName.toLowerCase(); + if (elem.id) { + out.id = elem.id; + } + className = elem.className; + if (className && (typeof className === 'string')) { + out.classes = className.split(/\s+/); + } + var attributes = ['type', 'name', 'title', 'alt']; + out.attributes = []; + for (i = 0; i < attributes.length; i++) { + key = attributes[i]; + attr = elem.getAttribute(key); + if (attr) { + out.attributes.push({key: key, value: attr}); + } + } + return out; + } + + module.exports = { + describeElement: describeElement, + descriptionToString: descriptionToString, + elementArrayToString: elementArrayToString, + treeToArray: treeToArray, + getElementFromEvent: getElementFromEvent, + isDescribedElement: isDescribedElement, + getElementType: getElementType + }; + + /***/ }) /******/ ]); \ No newline at end of file diff --git a/dist/rollbar.js.map b/dist/rollbar.js.map index 021895092..dd9683c25 100644 --- a/dist/rollbar.js.map +++ b/dist/rollbar.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap d771d728b73b273c9c51","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;;;;;;ACpBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;;;;;;;AChlBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;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,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d771d728b73b273c9c51","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = window && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = window && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif (window && !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 {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.js\n// module id = 0\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 3\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 6\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 7\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 11\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 12\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 13\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 14\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 15\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 16\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 17\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 18\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 19\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 20\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 21\n// module chunks = 0","'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 = _.extend(true, {}, item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 22\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\n var autoInstrument = options.autoInstrument;\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, this.autoInstrument);\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 = getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = isDescribedElement(e, 'a') || isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (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 = getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (isDescribedElement(e, 'input') && !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 || (getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else if (this.telemetryScrubber) {\n var description = describeElement(element);\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = elementArrayToString(treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\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.push(nextDescription);\n elem = elem.parentNode;\n }\n return out.reverse();\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 = 0; i < a.length; i++) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i > 0 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\n/**\n * Old implementation\n * Should be equivalent to: elementArrayToString(treeToArray(elem))\nfunction treeToString(elem) {\n var MAX_HEIGHT = 5, MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextStr = elementToString(elem);\n if (nextStr === 'html') {\n break;\n }\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (height > 1 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n elem = elem.parentNode;\n }\n return out.reverse().join(separator);\n}\n\nfunction elementToString(elem) {\n return descriptionToString(describeElement(elem));\n}\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 && _.isType(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\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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 24\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 2cd196c6c0d47e5704a7","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;;;;;;ACpBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzmBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACvDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3cA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2cd196c6c0d47e5704a7","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = window && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = window && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif (window && !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 {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.js\n// module id = 0\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 3\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isNativeFunction: isNativeFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 6\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 7\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 11\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 12\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 13\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 14\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 15\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 16\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 17\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 18\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 19\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 20\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 21\n// module chunks = 0","'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 = _.extend(true, {}, 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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 22\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, 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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 if (this.telemetryScrubber) {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber(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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 24\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/domUtility.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.min.js b/dist/rollbar.min.js index e16758356..04ba0f877 100644 --- a/dist/rollbar.min.js +++ b/dist/rollbar.min.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=n(1),o=window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",a=window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if(window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new r(o);window[i]=s}else window.rollbar=r,window._rollbarDidLoad=!0;t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,f,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(h.captureUncaughtExceptions(window,this),h.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&h.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(v.addMessageWithError).addTransform(v.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(v.itemToPayload)}function a(t){t.addPredicate(g.checkIgnore).addPredicate(g.userCheckIgnore).addPredicate(g.urlIsNotBlacklisted).addPredicate(g.urlIsWhitelisted).addPredicate(g.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(5);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function v(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function g(t,e){var n,r;try{n=N.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function y(t){var e,n;try{e=N.parse(t)}catch(t){n=t}return{error:n,value:e}}function b(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function w(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function _(t,e,n,r,o){for(var a,s,u,c,l,p,f=[],d=0,m=t.length;d0&&(u=L(!0,{},u),u.extraArgs=f);var b={message:a,err:s,custom:u,timestamp:O(),callback:c,uuid:h()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function x(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function O(){return Date.now?+Date.now():+new Date}var L=n(6),N={},C=!1;r();var j={debug:0,info:1,warning:2,error:3,critical:4},A={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isIterable:u,isError:c,extend:L,traverse:l,redact:p,uuid4:h,LEVELS:j,sanitizeUrl:f,addParamsAndAccessTokenToPath:m,formatUrl:v,stringify:g,jsonParse:y,makeUnhandledStackInfo:b,createItem:_,get:x,set:k,scrub:E,formatArgsAsString:S,now:O}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,h=!1;for("boolean"==typeof c?(h=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(5),a=n(11),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(5);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(13);var a=n(14),s=n(5);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(",");for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(5),p=n(12);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){v.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(5);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r ",i=o.length,a=[],s=0,u=0;u0&&n>=r));u++)a.push(e),s+=e.length;return a.join(o)}function p(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 n=0;n=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===a(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=h(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=l(c(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=d.parse(this._location.href),r=d.parse(e),o=d.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i}]); \ No newline at end of file +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=n(1),o=window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",a=window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if(window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new r(o);window[i]=s}else window.rollbar=r,window._rollbarDidLoad=!0;t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,f,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(h.captureUncaughtExceptions(window,this),h.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&h.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(g.addMessageWithError).addTransform(g.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(g.itemToPayload)}function a(t){t.addPredicate(v.checkIgnore).addPredicate(v.userCheckIgnore).addPredicate(v.urlIsNotBlacklisted).addPredicate(v.urlIsWhitelisted).addPredicate(v.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(5);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function y(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function b(t,e){var n,r;try{n=A.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function w(t){var e,n;try{e=A.parse(t)}catch(t){n=t}return{error:n,value:e}}function _(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function x(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function E(t,e,n,r,o){for(var a,s,u,c,l,p,h=[],f=0,m=t.length;f0&&(u=C(!0,{},u),u.extraArgs=h);var b={message:a,err:s,custom:u,timestamp:L(),callback:c,uuid:d()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function k(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function L(){return Date.now?+Date.now():+new Date}var C=n(6),A={},j=!1;r();var R={debug:0,info:1,warning:2,error:3,critical:4},D={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isNativeFunction:s,isIterable:l,isError:p,extend:C,traverse:h,redact:f,uuid4:d,LEVELS:R,sanitizeUrl:m,addParamsAndAccessTokenToPath:v,formatUrl:y,stringify:b,jsonParse:w,makeUnhandledStackInfo:_,createItem:E,get:k,set:I,scrub:T,formatArgsAsString:N,now:L}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,h=!1;for("boolean"==typeof c?(h=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(5),a=n(11),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(5);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(13);var a=n(14),s=n(5);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(","); +for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(5),p=n(12);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){g.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),t._originalArgs&&(o._originalArgs=t._originalArgs),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(5);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=u.describeElement(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=s.parse(this._location.href),r=s.parse(e),o=s.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i},function(t,e){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o ",i=o.length,a=[],u=0,c=t.length-1;c>=0;c--){if(e=s(t[c]),n=u+a.length*i+e.length,c=r+3){a.unshift("...");break}a.unshift(e),u+=e.length}return a.join(o)}function s(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 n=0;n 0 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - } - return out.join(separator); - } - - /** - * Old implementation - * Should be equivalent to: elementArrayToString(treeToArray(elem)) - function treeToString(elem) { - var MAX_HEIGHT = 5, MAX_LENGTH = 80; - var separator = ' > ', separatorLength = separator.length; - var out = [], len = 0, nextStr, totalLength; - - for (var height = 0; elem && height < MAX_HEIGHT; height++) { - nextStr = elementToString(elem); - if (nextStr === 'html') { - break; - } - totalLength = len + (out.length * separatorLength) + nextStr.length; - if (height > 1 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - elem = elem.parentNode; - } - return out.reverse().join(separator); - } - - function elementToString(elem) { - return descriptionToString(describeElement(elem)); - } - */ - - function descriptionToString(desc) { - if (!desc || !desc.tagName) { - return ''; - } - var out = [desc.tagName]; - if (desc.id) { - out.push('#' + desc.id); - } - if (desc.classes) { - out.push('.' + desc.classes.join('.')); - } - for (var i = 0; i < desc.attributes.length; i++) { - out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); - } - - return out.join(''); - } - - /** - * Input: a dom element - * Output: null if tagName is falsey or input is falsey, else - * { - * tagName: String, - * id: String | undefined, - * classes: [String] | undefined, - * attributes: [ - * { - * key: OneOf(type, name, title, alt), - * value: String - * } - * ] - * } - */ - function describeElement(elem) { - if (!elem || !elem.tagName) { - return null; - } - var out = {}, className, key, attr, i; - out.tagName = elem.tagName.toLowerCase(); - if (elem.id) { - out.id = elem.id; - } - className = elem.className; - if (className && _.isType(className, 'string')) { - out.classes = className.split(/\s+/); - } - var attributes = ['type', 'name', 'title', 'alt']; - out.attributes = []; - for (i = 0; i < attributes.length; i++) { - key = attributes[i]; - attr = elem.getAttribute(key); - if (attr) { - out.attributes.push({key: key, value: attr}); - } - } - return out; - } - Instrumenter.prototype.deinstrumentNavigation = function() { var chrome = this._window.chrome; var chromePackagedApp = chrome && chrome.app && chrome.app.runtime; @@ -4957,5 +4837,143 @@ define("rollbar", [], function() { return /******/ (function(modules) { // webpa module.exports = Instrumenter; +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + + 'use strict'; + + function getElementType(e) { + return (e.getAttribute('type') || '').toLowerCase(); + } + + function isDescribedElement(element, type, subtypes) { + if (element.tagName.toLowerCase() !== type.toLowerCase()) { + return false; + } + if (!subtypes) { + return true; + } + element = getElementType(element); + for (var i = 0; i < subtypes.length; i++) { + if (subtypes[i] === element) { + return true; + } + } + return false; + } + + function getElementFromEvent(evt, doc) { + if (evt.target) { + return evt.target; + } + if (doc && doc.elementFromPoint) { + return doc.elementFromPoint(evt.clientX, evt.clientY); + } + return undefined; + } + + function treeToArray(elem) { + var MAX_HEIGHT = 5; + var out = []; + var nextDescription; + for (var height = 0; elem && height < MAX_HEIGHT; height++) { + nextDescription = describeElement(elem); + if (nextDescription.tagName === 'html') { + break; + } + out.unshift(nextDescription); + elem = elem.parentNode; + } + return out; + } + + function elementArrayToString(a) { + var MAX_LENGTH = 80; + var separator = ' > ', separatorLength = separator.length; + var out = [], len = 0, nextStr, totalLength; + + for (var i = a.length - 1; i >= 0; i--) { + nextStr = descriptionToString(a[i]); + totalLength = len + (out.length * separatorLength) + nextStr.length; + if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) { + out.unshift('...'); + break; + } + out.unshift(nextStr); + len += nextStr.length; + } + return out.join(separator); + } + + function descriptionToString(desc) { + if (!desc || !desc.tagName) { + return ''; + } + var out = [desc.tagName]; + if (desc.id) { + out.push('#' + desc.id); + } + if (desc.classes) { + out.push('.' + desc.classes.join('.')); + } + for (var i = 0; i < desc.attributes.length; i++) { + out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); + } + + return out.join(''); + } + + /** + * Input: a dom element + * Output: null if tagName is falsey or input is falsey, else + * { + * tagName: String, + * id: String | undefined, + * classes: [String] | undefined, + * attributes: [ + * { + * key: OneOf(type, name, title, alt), + * value: String + * } + * ] + * } + */ + function describeElement(elem) { + if (!elem || !elem.tagName) { + return null; + } + var out = {}, className, key, attr, i; + out.tagName = elem.tagName.toLowerCase(); + if (elem.id) { + out.id = elem.id; + } + className = elem.className; + if (className && (typeof className === 'string')) { + out.classes = className.split(/\s+/); + } + var attributes = ['type', 'name', 'title', 'alt']; + out.attributes = []; + for (i = 0; i < attributes.length; i++) { + key = attributes[i]; + attr = elem.getAttribute(key); + if (attr) { + out.attributes.push({key: key, value: attr}); + } + } + return out; + } + + module.exports = { + describeElement: describeElement, + descriptionToString: descriptionToString, + elementArrayToString: elementArrayToString, + treeToArray: treeToArray, + getElementFromEvent: getElementFromEvent, + isDescribedElement: isDescribedElement, + getElementType: getElementType + }; + + /***/ }) /******/ ])});; \ No newline at end of file diff --git a/dist/rollbar.named-amd.js.map b/dist/rollbar.named-amd.js.map index c1fabdcf4..717a19d3b 100644 --- a/dist/rollbar.named-amd.js.map +++ b/dist/rollbar.named-amd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap c0c756411f31e8a27467","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;;;;;;ACpBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;;;;;;;AChlBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;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,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c0c756411f31e8a27467","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = window && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = window && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif (window && !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 {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.js\n// module id = 1\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 3\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 4\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 7\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 8\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 12\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 13\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 14\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 15\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 16\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 17\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 19\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 20\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 21\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 22\n// module chunks = 0","'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 = _.extend(true, {}, item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 24\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\n var autoInstrument = options.autoInstrument;\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, this.autoInstrument);\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 = getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = isDescribedElement(e, 'a') || isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (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 = getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (isDescribedElement(e, 'input') && !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 || (getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else if (this.telemetryScrubber) {\n var description = describeElement(element);\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = elementArrayToString(treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\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.push(nextDescription);\n elem = elem.parentNode;\n }\n return out.reverse();\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 = 0; i < a.length; i++) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i > 0 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\n/**\n * Old implementation\n * Should be equivalent to: elementArrayToString(treeToArray(elem))\nfunction treeToString(elem) {\n var MAX_HEIGHT = 5, MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextStr = elementToString(elem);\n if (nextStr === 'html') {\n break;\n }\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (height > 1 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n elem = elem.parentNode;\n }\n return out.reverse().join(separator);\n}\n\nfunction elementToString(elem) {\n return descriptionToString(describeElement(elem));\n}\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 && _.isType(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\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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 33160431032eb3f213d4","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;;;;;;ACpBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzmBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACvDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3cA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 33160431032eb3f213d4","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = window && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = window && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif (window && !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 {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.js\n// module id = 1\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 3\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 4\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isNativeFunction: isNativeFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 7\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 8\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 12\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 13\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 14\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 15\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 16\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 17\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 19\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 20\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 21\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 22\n// module chunks = 0","'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 = _.extend(true, {}, 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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 24\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, 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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 if (this.telemetryScrubber) {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber(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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 25\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/domUtility.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.named-amd.min.js b/dist/rollbar.named-amd.min.js index 78b57e0d9..1384fe696 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){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var r=n(2),o=window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",a=window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if(window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new r(o);window[i]=s}else window.rollbar=r,window._rollbarDidLoad=!0;t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,f,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(h.captureUncaughtExceptions(window,this),h.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&h.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(v.addMessageWithError).addTransform(v.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(v.itemToPayload)}function a(t){t.addPredicate(g.checkIgnore).addPredicate(g.userCheckIgnore).addPredicate(g.urlIsNotBlacklisted).addPredicate(g.urlIsWhitelisted).addPredicate(g.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(6);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function v(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function g(t,e){var n,r;try{n=N.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function y(t){var e,n;try{e=N.parse(t)}catch(t){n=t}return{error:n,value:e}}function b(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function w(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function _(t,e,n,r,o){for(var a,s,u,c,l,p,f=[],d=0,m=t.length;d0&&(u=L(!0,{},u),u.extraArgs=f);var b={message:a,err:s,custom:u,timestamp:O(),callback:c,uuid:h()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function x(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function O(){return Date.now?+Date.now():+new Date}var L=n(7),N={},C=!1;r();var j={debug:0,info:1,warning:2,error:3,critical:4},A={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isIterable:u,isError:c,extend:L,traverse:l,redact:p,uuid4:h,LEVELS:j,sanitizeUrl:f,addParamsAndAccessTokenToPath:m,formatUrl:v,stringify:g,jsonParse:y,makeUnhandledStackInfo:b,createItem:_,get:x,set:k,scrub:E,formatArgsAsString:S,now:O}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,h=!1;for("boolean"==typeof c?(h=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(6),a=n(12),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(6);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(14);var a=n(15),s=n(6);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(",");for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(6),p=n(13);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){v.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(6);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r ",i=o.length,a=[],s=0,u=0;u0&&n>=r));u++)a.push(e),s+=e.length;return a.join(o)}function p(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 n=0;n=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===a(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=h(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=l(c(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=d.parse(this._location.href),r=d.parse(e),o=d.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i}])}); \ No newline at end of file +define("rollbar",[],function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var r=n(2),o=window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",a=window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if(window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new r(o);window[i]=s}else window.rollbar=r,window._rollbarDidLoad=!0;t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,h,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(f.captureUncaughtExceptions(window,this),f.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&f.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(g.addMessageWithError).addTransform(g.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(g.itemToPayload)}function a(t){t.addPredicate(v.checkIgnore).addPredicate(v.userCheckIgnore).addPredicate(v.urlIsNotBlacklisted).addPredicate(v.urlIsWhitelisted).addPredicate(v.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(6);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function y(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function b(t,e){var n,r;try{n=A.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function w(t){var e,n;try{e=A.parse(t)}catch(t){n=t}return{error:n,value:e}}function _(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function x(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function E(t,e,n,r,o){for(var a,s,u,c,l,p,f=[],h=0,m=t.length;h0&&(u=C(!0,{},u),u.extraArgs=f);var b={message:a,err:s,custom:u,timestamp:L(),callback:c,uuid:d()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function k(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function L(){return Date.now?+Date.now():+new Date}var C=n(7),A={},j=!1;r();var R={debug:0,info:1,warning:2,error:3,critical:4},D={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isNativeFunction:s,isIterable:l,isError:p,extend:C,traverse:f,redact:h,uuid4:d,LEVELS:R,sanitizeUrl:m,addParamsAndAccessTokenToPath:v,formatUrl:y,stringify:b,jsonParse:w,makeUnhandledStackInfo:_,createItem:E,get:k,set:I,scrub:T,formatArgsAsString:N,now:L}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,f=!1;for("boolean"==typeof c?(f=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(6),a=n(12),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(6);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(14);var a=n(15),s=n(6);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(","); +for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(6),p=n(13);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){g.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),t._originalArgs&&(o._originalArgs=t._originalArgs),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(6);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=u.describeElement(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=s.parse(this._location.href),r=s.parse(e),o=s.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i},function(t,e){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o ",i=o.length,a=[],u=0,c=t.length-1;c>=0;c--){if(e=s(t[c]),n=u+a.length*i+e.length,c=r+3){a.unshift("...");break}a.unshift(e),u+=e.length}return a.join(o)}function s(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 n=0;n 0 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - } - return out.join(separator); - } - - /** - * Old implementation - * Should be equivalent to: elementArrayToString(treeToArray(elem)) - function treeToString(elem) { - var MAX_HEIGHT = 5, MAX_LENGTH = 80; - var separator = ' > ', separatorLength = separator.length; - var out = [], len = 0, nextStr, totalLength; - - for (var height = 0; elem && height < MAX_HEIGHT; height++) { - nextStr = elementToString(elem); - if (nextStr === 'html') { - break; - } - totalLength = len + (out.length * separatorLength) + nextStr.length; - if (height > 1 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - elem = elem.parentNode; - } - return out.reverse().join(separator); - } - - function elementToString(elem) { - return descriptionToString(describeElement(elem)); - } - */ - - function descriptionToString(desc) { - if (!desc || !desc.tagName) { - return ''; - } - var out = [desc.tagName]; - if (desc.id) { - out.push('#' + desc.id); - } - if (desc.classes) { - out.push('.' + desc.classes.join('.')); - } - for (var i = 0; i < desc.attributes.length; i++) { - out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); - } - - return out.join(''); - } - - /** - * Input: a dom element - * Output: null if tagName is falsey or input is falsey, else - * { - * tagName: String, - * id: String | undefined, - * classes: [String] | undefined, - * attributes: [ - * { - * key: OneOf(type, name, title, alt), - * value: String - * } - * ] - * } - */ - function describeElement(elem) { - if (!elem || !elem.tagName) { - return null; - } - var out = {}, className, key, attr, i; - out.tagName = elem.tagName.toLowerCase(); - if (elem.id) { - out.id = elem.id; - } - className = elem.className; - if (className && _.isType(className, 'string')) { - out.classes = className.split(/\s+/); - } - var attributes = ['type', 'name', 'title', 'alt']; - out.attributes = []; - for (i = 0; i < attributes.length; i++) { - key = attributes[i]; - attr = elem.getAttribute(key); - if (attr) { - out.attributes.push({key: key, value: attr}); - } - } - return out; - } - Instrumenter.prototype.deinstrumentNavigation = function() { var chrome = this._window.chrome; var chromePackagedApp = chrome && chrome.app && chrome.app.runtime; @@ -4955,6 +4835,144 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Instrumenter; +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + + 'use strict'; + + function getElementType(e) { + return (e.getAttribute('type') || '').toLowerCase(); + } + + function isDescribedElement(element, type, subtypes) { + if (element.tagName.toLowerCase() !== type.toLowerCase()) { + return false; + } + if (!subtypes) { + return true; + } + element = getElementType(element); + for (var i = 0; i < subtypes.length; i++) { + if (subtypes[i] === element) { + return true; + } + } + return false; + } + + function getElementFromEvent(evt, doc) { + if (evt.target) { + return evt.target; + } + if (doc && doc.elementFromPoint) { + return doc.elementFromPoint(evt.clientX, evt.clientY); + } + return undefined; + } + + function treeToArray(elem) { + var MAX_HEIGHT = 5; + var out = []; + var nextDescription; + for (var height = 0; elem && height < MAX_HEIGHT; height++) { + nextDescription = describeElement(elem); + if (nextDescription.tagName === 'html') { + break; + } + out.unshift(nextDescription); + elem = elem.parentNode; + } + return out; + } + + function elementArrayToString(a) { + var MAX_LENGTH = 80; + var separator = ' > ', separatorLength = separator.length; + var out = [], len = 0, nextStr, totalLength; + + for (var i = a.length - 1; i >= 0; i--) { + nextStr = descriptionToString(a[i]); + totalLength = len + (out.length * separatorLength) + nextStr.length; + if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) { + out.unshift('...'); + break; + } + out.unshift(nextStr); + len += nextStr.length; + } + return out.join(separator); + } + + function descriptionToString(desc) { + if (!desc || !desc.tagName) { + return ''; + } + var out = [desc.tagName]; + if (desc.id) { + out.push('#' + desc.id); + } + if (desc.classes) { + out.push('.' + desc.classes.join('.')); + } + for (var i = 0; i < desc.attributes.length; i++) { + out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); + } + + return out.join(''); + } + + /** + * Input: a dom element + * Output: null if tagName is falsey or input is falsey, else + * { + * tagName: String, + * id: String | undefined, + * classes: [String] | undefined, + * attributes: [ + * { + * key: OneOf(type, name, title, alt), + * value: String + * } + * ] + * } + */ + function describeElement(elem) { + if (!elem || !elem.tagName) { + return null; + } + var out = {}, className, key, attr, i; + out.tagName = elem.tagName.toLowerCase(); + if (elem.id) { + out.id = elem.id; + } + className = elem.className; + if (className && (typeof className === 'string')) { + out.classes = className.split(/\s+/); + } + var attributes = ['type', 'name', 'title', 'alt']; + out.attributes = []; + for (i = 0; i < attributes.length; i++) { + key = attributes[i]; + attr = elem.getAttribute(key); + if (attr) { + out.attributes.push({key: key, value: attr}); + } + } + return out; + } + + module.exports = { + describeElement: describeElement, + descriptionToString: descriptionToString, + elementArrayToString: elementArrayToString, + treeToArray: treeToArray, + getElementFromEvent: getElementFromEvent, + isDescribedElement: isDescribedElement, + getElementType: getElementType + }; + + /***/ }) /******/ ]) }); diff --git a/dist/rollbar.noconflict.umd.js.map b/dist/rollbar.noconflict.umd.js.map index 3b22611aa..065c88795 100644 --- a/dist/rollbar.noconflict.umd.js.map +++ b/dist/rollbar.noconflict.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 585630af0b51afe4d0da","webpack:///./src/browser/bundles/rollbar.noconflict.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACRA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;;;;;;;AChlBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;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,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","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 {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 585630af0b51afe4d0da","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif (window && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.noconflict.js\n// module id = 1\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 3\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 4\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 7\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 8\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 12\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 13\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 14\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 15\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 16\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 17\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 19\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 20\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 21\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 22\n// module chunks = 0","'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 = _.extend(true, {}, item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 24\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\n var autoInstrument = options.autoInstrument;\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, this.autoInstrument);\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 = getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = isDescribedElement(e, 'a') || isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (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 = getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (isDescribedElement(e, 'input') && !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 || (getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else if (this.telemetryScrubber) {\n var description = describeElement(element);\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = elementArrayToString(treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\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.push(nextDescription);\n elem = elem.parentNode;\n }\n return out.reverse();\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 = 0; i < a.length; i++) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i > 0 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\n/**\n * Old implementation\n * Should be equivalent to: elementArrayToString(treeToArray(elem))\nfunction treeToString(elem) {\n var MAX_HEIGHT = 5, MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextStr = elementToString(elem);\n if (nextStr === 'html') {\n break;\n }\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (height > 1 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n elem = elem.parentNode;\n }\n return out.reverse().join(separator);\n}\n\nfunction elementToString(elem) {\n return descriptionToString(describeElement(elem));\n}\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 && _.isType(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\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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b4febdcd1f4270a37951","webpack:///./src/browser/bundles/rollbar.noconflict.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACRA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzmBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACvDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3cA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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 \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b4febdcd1f4270a37951","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif (window && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.noconflict.js\n// module id = 1\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 3\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 4\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isNativeFunction: isNativeFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 7\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 8\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 12\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 13\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 14\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 15\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 16\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 17\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 19\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 20\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 21\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 22\n// module chunks = 0","'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 = _.extend(true, {}, 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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 24\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, 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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 if (this.telemetryScrubber) {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber(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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 25\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/domUtility.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.min.js b/dist/rollbar.noconflict.umd.min.js index c13f052b3..12ae8d129 100644 --- a/dist/rollbar.noconflict.umd.min.js +++ b/dist/rollbar.noconflict.umd.min.js @@ -1,2 +1,2 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var r=n(2);window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,h,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(f.captureUncaughtExceptions(window,this),f.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&f.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(v.addMessageWithError).addTransform(v.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(v.itemToPayload)}function a(t){t.addPredicate(g.checkIgnore).addPredicate(g.userCheckIgnore).addPredicate(g.urlIsNotBlacklisted).addPredicate(g.urlIsWhitelisted).addPredicate(g.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(6);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function v(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function g(t,e){var n,r;try{n=L.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function y(t){var e,n;try{e=L.parse(t)}catch(t){n=t}return{error:n,value:e}}function b(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function w(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function _(t,e,n,r,o){for(var a,s,u,c,l,p,h=[],d=0,m=t.length;d0&&(u=N(!0,{},u),u.extraArgs=h);var b={message:a,err:s,custom:u,timestamp:O(),callback:c,uuid:f()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function x(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function O(){return Date.now?+Date.now():+new Date}var N=n(7),L={},C=!1;r();var j={debug:0,info:1,warning:2,error:3,critical:4},A={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isIterable:u,isError:c,extend:N,traverse:l,redact:p,uuid4:f,LEVELS:j,sanitizeUrl:h,addParamsAndAccessTokenToPath:m,formatUrl:v,stringify:g,jsonParse:y,makeUnhandledStackInfo:b,createItem:_,get:x,set:k,scrub:E,formatArgsAsString:S,now:O}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,f=!1;for("boolean"==typeof c?(f=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(6),a=n(12),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(6);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(14);var a=n(15),s=n(6);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(",");for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(6),p=n(13);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){v.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(6);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r ",i=o.length,a=[],s=0,u=0;u0&&n>=r));u++)a.push(e),s+=e.length;return a.join(o)}function p(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 n=0;n=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===a(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=f(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=l(c(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=d.parse(this._location.href),r=d.parse(e),o=d.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i}])}); \ No newline at end of file +!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){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var r=n(2);window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,h,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(f.captureUncaughtExceptions(window,this),f.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&f.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(g.addMessageWithError).addTransform(g.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(g.itemToPayload)}function a(t){t.addPredicate(v.checkIgnore).addPredicate(v.userCheckIgnore).addPredicate(v.urlIsNotBlacklisted).addPredicate(v.urlIsWhitelisted).addPredicate(v.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(6);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function y(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function b(t,e){var n,r;try{n=j.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function w(t){var e,n;try{e=j.parse(t)}catch(t){n=t}return{error:n,value:e}}function _(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function x(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function E(t,e,n,r,o){for(var a,s,u,c,l,p,f=[],h=0,m=t.length;h0&&(u=C(!0,{},u),u.extraArgs=f);var b={message:a,err:s,custom:u,timestamp:L(),callback:c,uuid:d()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function k(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function L(){return Date.now?+Date.now():+new Date}var C=n(7),j={},A=!1;r();var R={debug:0,info:1,warning:2,error:3,critical:4},D={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isNativeFunction:s,isIterable:l,isError:p,extend:C,traverse:f,redact:h,uuid4:d,LEVELS:R,sanitizeUrl:m,addParamsAndAccessTokenToPath:v,formatUrl:y,stringify:b,jsonParse:w,makeUnhandledStackInfo:_,createItem:E,get:k,set:I,scrub:T,formatArgsAsString:N,now:L}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,f=!1;for("boolean"==typeof c?(f=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(6),a=n(12),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(6);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(14);var a=n(15),s=n(6);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(","); +for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(6),p=n(13);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){g.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),t._originalArgs&&(o._originalArgs=t._originalArgs),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(6);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=u.describeElement(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=s.parse(this._location.href),r=s.parse(e),o=s.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i},function(t,e){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o ",i=o.length,a=[],u=0,c=t.length-1;c>=0;c--){if(e=s(t[c]),n=u+a.length*i+e.length,c=r+3){a.unshift("...");break}a.unshift(e),u+=e.length}return a.join(o)}function s(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 n=0;n 0 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - } - return out.join(separator); - } - - /** - * Old implementation - * Should be equivalent to: elementArrayToString(treeToArray(elem)) - function treeToString(elem) { - var MAX_HEIGHT = 5, MAX_LENGTH = 80; - var separator = ' > ', separatorLength = separator.length; - var out = [], len = 0, nextStr, totalLength; - - for (var height = 0; elem && height < MAX_HEIGHT; height++) { - nextStr = elementToString(elem); - if (nextStr === 'html') { - break; - } - totalLength = len + (out.length * separatorLength) + nextStr.length; - if (height > 1 && totalLength >= MAX_LENGTH) { - break; - } - out.push(nextStr); - len += nextStr.length; - elem = elem.parentNode; - } - return out.reverse().join(separator); - } - - function elementToString(elem) { - return descriptionToString(describeElement(elem)); - } - */ - - function descriptionToString(desc) { - if (!desc || !desc.tagName) { - return ''; - } - var out = [desc.tagName]; - if (desc.id) { - out.push('#' + desc.id); - } - if (desc.classes) { - out.push('.' + desc.classes.join('.')); - } - for (var i = 0; i < desc.attributes.length; i++) { - out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); - } - - return out.join(''); - } - - /** - * Input: a dom element - * Output: null if tagName is falsey or input is falsey, else - * { - * tagName: String, - * id: String | undefined, - * classes: [String] | undefined, - * attributes: [ - * { - * key: OneOf(type, name, title, alt), - * value: String - * } - * ] - * } - */ - function describeElement(elem) { - if (!elem || !elem.tagName) { - return null; - } - var out = {}, className, key, attr, i; - out.tagName = elem.tagName.toLowerCase(); - if (elem.id) { - out.id = elem.id; - } - className = elem.className; - if (className && _.isType(className, 'string')) { - out.classes = className.split(/\s+/); - } - var attributes = ['type', 'name', 'title', 'alt']; - out.attributes = []; - for (i = 0; i < attributes.length; i++) { - key = attributes[i]; - attr = elem.getAttribute(key); - if (attr) { - out.attributes.push({key: key, value: attr}); - } - } - return out; - } - Instrumenter.prototype.deinstrumentNavigation = function() { var chrome = this._window.chrome; var chromePackagedApp = chrome && chrome.app && chrome.app.runtime; @@ -4967,6 +4847,144 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Instrumenter; +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + + 'use strict'; + + function getElementType(e) { + return (e.getAttribute('type') || '').toLowerCase(); + } + + function isDescribedElement(element, type, subtypes) { + if (element.tagName.toLowerCase() !== type.toLowerCase()) { + return false; + } + if (!subtypes) { + return true; + } + element = getElementType(element); + for (var i = 0; i < subtypes.length; i++) { + if (subtypes[i] === element) { + return true; + } + } + return false; + } + + function getElementFromEvent(evt, doc) { + if (evt.target) { + return evt.target; + } + if (doc && doc.elementFromPoint) { + return doc.elementFromPoint(evt.clientX, evt.clientY); + } + return undefined; + } + + function treeToArray(elem) { + var MAX_HEIGHT = 5; + var out = []; + var nextDescription; + for (var height = 0; elem && height < MAX_HEIGHT; height++) { + nextDescription = describeElement(elem); + if (nextDescription.tagName === 'html') { + break; + } + out.unshift(nextDescription); + elem = elem.parentNode; + } + return out; + } + + function elementArrayToString(a) { + var MAX_LENGTH = 80; + var separator = ' > ', separatorLength = separator.length; + var out = [], len = 0, nextStr, totalLength; + + for (var i = a.length - 1; i >= 0; i--) { + nextStr = descriptionToString(a[i]); + totalLength = len + (out.length * separatorLength) + nextStr.length; + if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) { + out.unshift('...'); + break; + } + out.unshift(nextStr); + len += nextStr.length; + } + return out.join(separator); + } + + function descriptionToString(desc) { + if (!desc || !desc.tagName) { + return ''; + } + var out = [desc.tagName]; + if (desc.id) { + out.push('#' + desc.id); + } + if (desc.classes) { + out.push('.' + desc.classes.join('.')); + } + for (var i = 0; i < desc.attributes.length; i++) { + out.push('[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]'); + } + + return out.join(''); + } + + /** + * Input: a dom element + * Output: null if tagName is falsey or input is falsey, else + * { + * tagName: String, + * id: String | undefined, + * classes: [String] | undefined, + * attributes: [ + * { + * key: OneOf(type, name, title, alt), + * value: String + * } + * ] + * } + */ + function describeElement(elem) { + if (!elem || !elem.tagName) { + return null; + } + var out = {}, className, key, attr, i; + out.tagName = elem.tagName.toLowerCase(); + if (elem.id) { + out.id = elem.id; + } + className = elem.className; + if (className && (typeof className === 'string')) { + out.classes = className.split(/\s+/); + } + var attributes = ['type', 'name', 'title', 'alt']; + out.attributes = []; + for (i = 0; i < attributes.length; i++) { + key = attributes[i]; + attr = elem.getAttribute(key); + if (attr) { + out.attributes.push({key: key, value: attr}); + } + } + return out; + } + + module.exports = { + describeElement: describeElement, + descriptionToString: descriptionToString, + elementArrayToString: elementArrayToString, + treeToArray: treeToArray, + getElementFromEvent: getElementFromEvent, + isDescribedElement: isDescribedElement, + getElementType: getElementType + }; + + /***/ }) /******/ ]) }); diff --git a/dist/rollbar.umd.js.map b/dist/rollbar.umd.js.map index 229cb7c39..53ae0ac7d 100644 --- a/dist/rollbar.umd.js.map +++ b/dist/rollbar.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b396bdc2dd3fb6afdf44","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;;;;;;ACpBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;;;;;;;AChlBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;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,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","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 {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b396bdc2dd3fb6afdf44","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = window && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = window && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif (window && !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 {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.js\n// module id = 1\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 3\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 4\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 7\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 8\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 12\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 13\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 14\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 15\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 16\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 17\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 19\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 20\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 21\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 22\n// module chunks = 0","'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 = _.extend(true, {}, item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 24\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\n var autoInstrument = options.autoInstrument;\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, this.autoInstrument);\n if (autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 = getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = isDescribedElement(e, 'a') || isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (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 = getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (isDescribedElement(e, 'input') && !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 || (getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else if (this.telemetryScrubber) {\n var description = describeElement(element);\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = elementArrayToString(treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\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.push(nextDescription);\n elem = elem.parentNode;\n }\n return out.reverse();\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 = 0; i < a.length; i++) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i > 0 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\n/**\n * Old implementation\n * Should be equivalent to: elementArrayToString(treeToArray(elem))\nfunction treeToString(elem) {\n var MAX_HEIGHT = 5, MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextStr = elementToString(elem);\n if (nextStr === 'html') {\n break;\n }\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (height > 1 && totalLength >= MAX_LENGTH) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n elem = elem.parentNode;\n }\n return out.reverse().join(separator);\n}\n\nfunction elementToString(elem) {\n return descriptionToString(describeElement(elem));\n}\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 && _.isType(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\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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 9384c435a7cba2ca48f6","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/queue.js","webpack:///./src/utility.js","webpack:///./~/extend/index.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/notifier.js","webpack:///./src/telemetry.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./src/browser/logger.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/url.js","webpack:///./src/browser/transforms.js","webpack:///./src/browser/errorParser.js","webpack:///./~/error-stack-parser/error-stack-parser.js","webpack:///./~/error-stack-parser/~/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACtCA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;;;;;;ACpBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,2BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjZA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA,mCAAkC;AAClC;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/HA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjIA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA,yDAAwD,WAAW;AACnE;AACA;AACA,gBAAe,WAAW;AAC1B,gBAAe,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,4BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,gDAA+C,SAAS;AACxD;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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;;;;;;;ACnQA;;AAEA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,gBAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,WAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,WAAU;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,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAkC,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,oDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;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,yCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,kBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzmBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA,QAAO,YAAY;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAAyE;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,qBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,iBAAiB;AAC1D,+BAA8B,kBAAkB;;AAEhD,0CAAyC,iBAAiB;AAC1D,uCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAwB;AACxB,gDAA+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,QAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,WAAU;AACV,WAAU;AACV,WAAU;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,sBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;AACA,eAAc,wDAAwD;AACtE,eAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,eAAc;AACd,iBAAgB;AAChB,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,yBAAwB,YAAY;AACpC;AACA;AACA,YAAW;AACX;AACA,yBAAwB,gDAAgD;AACxE;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA,YAAW;AACX;AACA,yBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uCAAsC,EAAE;AACxC;AACA;AACA;AACA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,gDAA+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,cAAa;;AAEb;AACA;;AAEA;AACA;AACA,cAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAS;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,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE,UAAU;AACvB;AACA;AACA,MAAK;AACL;AACA;;AAEA;;;;;;;AC1vBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;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,IAAG;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;;;;;;;ACvHA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;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,sCAAqC,mBAAmB;AACxD;;AAEA;AACA,sCAAqC,4BAA4B;AACjE;AACA;AACA,+BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,sCAAqC,gBAAgB;AACrD;AACA;AACA,+BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA8B,aAAa;AAC3C;;AAEA;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;;;;;;;ACrJA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;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;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;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;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;;AAEA;AACA,iBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA,cAAa,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;AACA;AACA;AACA;AACA;;;;;;;AC5GA;;AAEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;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,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC7MA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AChFA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA,qBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;AACpC;;AAEA,6BAA4B,gBAAgB;AAC5C;AACA;;;AAGA;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;AACA;;AAEA;AACA,gBAAe,kBAAkB;AACjC;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,sCAAqC;AACrC;AACA,+BAA8B,aAAa;AAC3C;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChQA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA,oBAAmB,wBAAwB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzFA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA,4BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,EAAC;;;;;;;;AC/LD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;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,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;;AAET;AACA,4DAA2D,UAAU;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;AC1GD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;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,sCAAqC,UAAU,sBAAsB;AACrE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACvDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,gBAAgB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpJA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3cA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,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,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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 \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9384c435a7cba2ca48f6","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = window && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = window && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif (window && !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 {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/bundles/rollbar.js\n// module id = 1\n// module chunks = 0","'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 errorParser = require('./errorParser');\nvar Instrumenter = require('./telemetry');\n\nfunction Rollbar(options, client) {\n this.options = _.extend(true, defaultOptions, options);\n var api = new API(this.options, transport, urllib);\n this.client = client || new Client(this.options, api, logger, 'browser');\n\n addTransformsToNotifier(this.client.notifier);\n addPredicatesToQueue(this.client.queue);\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(window, this);\n globals.wrapGlobals(window, this);\n }\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(window, this);\n }\n\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, window, document);\n this.instrumenter.instrument();\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\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 = _.extend(true, {}, oldOptions, options, payload);\n this.client.configure(options, payloadData);\n this.instrumenter.configure(options);\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.handleUncaughtException = function(message, url, lineno, colno, error, context) {\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\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n var message = 'unhandled rejection was null or undefined!';\n message = reason ? (reason.message || String(reason)) : message;\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 (_.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 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)) {\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(metadata, level) {\n return this.client.captureEvent(metadata, level);\n};\nRollbar.captureEvent = function(metadata, level) {\n if (_instance) {\n return _instance.captureEvent(metadata, level);\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) {\n notifier\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(window))\n .addTransform(transforms.addClientInfo(window))\n .addTransform(transforms.addPluginInfo(window))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(transforms.scrubPayload)\n .addTransform(transforms.userTransform)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(predicates.checkIgnore)\n .addPredicate(predicates.userCheckIgnore)\n .addPredicate(predicates.urlIsNotBlacklisted)\n .addPredicate(predicates.urlIsWhitelisted)\n .addPredicate(predicates.messageIsIgnored);\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\n/* global __NOTIFIER_VERSION__:false */\n/* global __DEFAULT_BROWSER_SCRUB_FIELDS__:false */\n/* global __DEFAULT_LOG_LEVEL__:false */\n/* global __DEFAULT_REPORT_LEVEL__:false */\n/* global __DEFAULT_UNCAUGHT_ERROR_LEVEL:false */\n/* global __DEFAULT_ENDPOINT__:false */\n\nvar defaultOptions = {\n version: __NOTIFIER_VERSION__,\n scrubFields: __DEFAULT_BROWSER_SCRUB_FIELDS__,\n logLevel: __DEFAULT_LOG_LEVEL__,\n reportLevel: __DEFAULT_REPORT_LEVEL__,\n uncaughtErrorLevel: __DEFAULT_UNCAUGHT_ERROR_LEVEL,\n endpoint: __DEFAULT_ENDPOINT__,\n verbose: false,\n enabled: true\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/rollbar.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar Telemeter = require('./telemetry');\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, platform) {\n this.options = _.extend(true, {}, options);\n this.logger = logger;\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = new Telemeter(this.options);\n this.lastError = null;\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 this.notifier && this.notifier.configure(options);\n this.telemeter && this.telemeter.configure(options);\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.extend(true, {}, oldOptions, options, payload);\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(metadata, level) {\n return this.telemeter.captureEvent(metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function(ts) {\n return this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(ts) {\n return this.telemeter.captureLoad(ts);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function(defaultLevel, item) {\n if (this._sameAsLastError(item)) {\n return;\n }\n try {\n var callback = null;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n item.level = item.level || defaultLevel;\n item.telemetryEvents = this.telemeter.copyEvents();\n this.telemeter._captureRollbarItem(item);\n this.notifier.log(item, callback);\n } catch (e) {\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 (this.lastError && this.lastError === item.err) {\n return true;\n }\n this.lastError = item.err;\n return false;\n};\n\nmodule.exports = Rollbar;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rollbar.js\n// module id = 3\n// module chunks = 0","'use strict';\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 = (new Date()).getTime();\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: (new Date()).getTime(),\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 || (new Date()).getTime();\n if (now - this.startTime >= 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 return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit);\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) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var item = {\n body: {\n message: {\n body: 'maxItems has been hit. Ignoring errors until reset.',\n extra: {\n maxItems: globalRateLimit\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 }\n return item;\n}\n\nmodule.exports = RateLimiter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/rateLimiter.js\n// module id = 4\n// module chunks = 0","'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 = _.extend(true, {}, 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 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 }\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/queue.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar extend = require('extend');\n\nvar RollbarJSON = {};\nvar __initRollbarJSON = false;\nfunction setupJSON() {\n if (__initRollbarJSON) {\n return;\n }\n __initRollbarJSON = true;\n\n if (isDefined(JSON)) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n var setupCustomJSON = require('../vendor/JSON-js/json3.js');\n setupCustomJSON(RollbarJSON);\n }\n}\nsetupJSON();\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/*\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 return isType(e, 'error');\n}\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\n if (isObj && seen.indexOf(obj) !== -1) {\n return obj;\n }\n seen.push(obj);\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 for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n obj[k] = func(k, v, seen);\n }\n\n return obj;\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 // 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 throw new Error('received invalid input');\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n var i = o.key.length;\n\n while (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 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 = document && document.location && document.location.href;\n var useragent = 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 createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\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 '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 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 (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = extend(true, {}, custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n uuid: uuid4()\n };\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n return item;\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 scrub(data, scrubFields) {\n scrubFields = scrubFields || [];\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart, dummy1, dummy2, dummy3, valPart) {\n return paramPart + redact(valPart);\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(v);\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 traverse(data, scrubber, []);\n return data;\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\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 if (typeof arg === 'object') {\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500)\n arg = arg.substr(0,500)+'...';\n } else if (typeof arg === 'undefined') {\n arg = 'undefined';\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\nmodule.exports = {\n isType: isType,\n typeName: typeName,\n isFunction: isFunction,\n isNativeFunction: isNativeFunction,\n isIterable: isIterable,\n isError: isError,\n extend: extend,\n traverse: traverse,\n redact: redact,\n uuid4: uuid4,\n LEVELS: LEVELS,\n sanitizeUrl: sanitizeUrl,\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n formatUrl: formatUrl,\n stringify: stringify,\n jsonParse: jsonParse,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n createItem: createItem,\n get: get,\n set: set,\n scrub: scrub,\n formatArgsAsString: formatArgsAsString,\n now: now\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utility.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\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\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0],\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = target[name];\n\t\t\t\tcopy = options[name];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\ttarget[name] = extend(deep, clone, copy);\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/extend/index.js\n// module id = 7\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./vendor/JSON-js/json3.js\n// module id = 8\n// module chunks = 0","'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}\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 = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/notifier.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.extend(true, {}, 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 this.options = _.extend(true, {}, 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 return Array.prototype.slice.call(this.queue, 0);\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 this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(metadata, level, rollbarUUID) {\n return this.capture('manual', 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) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\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 (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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/telemetry.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1',\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\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, t, u, j) {\n this.options = options;\n this.transport = t;\n this.url = u;\n this.jsonBackup = j;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, u);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, '/item/', 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.extend(true, {}, 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (_.isType(data.context, 'object')) {\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\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 hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, path, 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 path = appendPathToPath(transport.path, path);\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 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/apiUtility.js\n// module id = 12\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/logger.js\n// module id = 13\n// module chunks = 0","// 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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/console-polyfill/index.js\n// module id = 14\n// module chunks = 0","'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 (!document) {\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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/detection.js\n// module id = 15\n// module chunks = 0","'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 && !window.onerror.belongsToShim) {\n oldOnError = window.onerror;\n handler._rollbarOldOnError = oldOnError;\n }\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n fn.belongsToShim = shim;\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 r.handleUncaughtException.apply(r, args);\n if (old) {\n old.apply(window, args);\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 (event) {\n var reason = event.reason;\n var promise = event.promise;\n var detail = event.detail;\n\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\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\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 = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n wrapGlobals: wrapGlobals\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/globalSetup.js\n// module id = 16\n// module chunks = 0","'use strict';\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 */\n\nfunction get(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 _makeRequest(accessToken, url, method, null, callback, requestFactory);\n}\n\nfunction post(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 = _.stringify(payload);\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 _makeRequest(accessToken, url, method, writeData, callback, requestFactory);\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory) {\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 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 = {\n get: get,\n post: post\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transport.js\n// module id = 17\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/url.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('./errorParser');\nvar logger = require('./logger');\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);\n } catch (e)\n /* istanbul ignore next */\n {\n logger.error('Error while parsing the error object.', e);\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n delete item.err;\n }\n }\n callback(null, item);\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 = _.extend(true, {}, 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 });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: '$remote_ip'\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 _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: window.navigator.userAgent,\n language: window.navigator.language,\n cookie_enabled: window.navigator.cookieEnabled,\n screen: {\n width: window.screen.width,\n height: window.screen.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 addBodyTrace(item, options, callback);\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 if (custom) {\n var scrubFields = options.scrubFields;\n var messageResult = _.stringify(_.scrub(custom, scrubFields));\n message = messageResult.error || messageResult.value || '';\n } else {\n message = '';\n }\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.extend(true, {}, custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\n\nfunction addBodyTrace(item, options, callback) {\n var description = item.data.description;\n var stackInfo = item.stackInfo;\n var custom = item.custom;\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = stackInfo.name || guess[0];\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 // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n if (stack) {\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 (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 = _.extend(true, {}, custom);\n }\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction scrubPayload(item, options, callback) {\n var scrubFields = options.scrubFields;\n _.scrub(item.data, scrubFields);\n callback(null, item);\n}\n\nfunction userTransform(item, options, callback) {\n var newItem = _.extend(true, {}, item);\n try {\n if (_.isFunction(options.transform)) {\n options.transform(newItem.data);\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 callback(null, newItem);\n}\n\nmodule.exports = {\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n scrubPayload: scrubPayload,\n userTransform: userTransform\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/transforms.js\n// module id = 19\n// module chunks = 0","'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(data.url, data.line);\n\n return data;\n}\n\n\nfunction Stack(exception) {\n function getStack() {\n var parserStack = [];\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = 0; 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: exception.name\n };\n}\n\n\nfunction parse(e) {\n return new Stack(e);\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg) {\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\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/errorParser.js\n// module id = 20\n// module chunks = 0","(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 function _map(array, fn, thisArg) {\n if (typeof Array.prototype.map === 'function') {\n return array.map(fn, thisArg);\n } else {\n var output = new Array(array.length);\n for (var i = 0; i < array.length; i++) {\n output[i] = fn.call(thisArg, array[i]);\n }\n return output;\n }\n }\n\n function _filter(array, fn, thisArg) {\n if (typeof Array.prototype.filter === 'function') {\n return array.filter(fn, thisArg);\n } else {\n var output = [];\n for (var i = 0; i < array.length; i++) {\n if (fn.call(thisArg, array[i])) {\n output.push(array[i]);\n }\n }\n return output;\n }\n }\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n * @param error {Error}\n * @return Array[StackFrame]\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 /**\n * Separate line and column numbers from a URL-like string.\n * @param urlLike String\n * @return Array[String]\n */\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 locationParts = urlLike.replace(/[\\(\\)\\s]/g, '').split(':');\n var lastNumber = locationParts.pop();\n var possibleNumber = locationParts[locationParts.length - 1];\n if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {\n var lineNumber = locationParts.pop();\n return [locationParts.join(':'), lineNumber, lastNumber];\n } else {\n return [locationParts.join(':'), lastNumber, undefined];\n }\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return _map(filtered, 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 tokens = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').split(/\\s+/).slice(1);\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = locationParts[0] === 'eval' ? undefined : locationParts[0];\n\n return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = _filter(error.stack.split('\\n'), function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return _map(filtered, 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(line);\n } else {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionName = tokens.shift() || undefined;\n return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);\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(undefined, undefined, match[2], match[1], undefined, lines[i]));\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(new StackFrame(match[3] || undefined, undefined, match[2], match[1], undefined, lines[i]));\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 = _filter(error.stack.split('\\n'), function (line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&\n !line.match(/^Error created at/);\n }, this);\n\n return _map(filtered, 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]') ? undefined : argsRaw.split(',');\n return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);\n }, this);\n }\n };\n}));\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/error-stack-parser.js\n// module id = 21\n// module chunks = 0","(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 StackFrame(functionName, args, fileName, lineNumber, columnNumber, source) {\n if (functionName !== undefined) {\n this.setFunctionName(functionName);\n }\n if (args !== undefined) {\n this.setArgs(args);\n }\n if (fileName !== undefined) {\n this.setFileName(fileName);\n }\n if (lineNumber !== undefined) {\n this.setLineNumber(lineNumber);\n }\n if (columnNumber !== undefined) {\n this.setColumnNumber(columnNumber);\n }\n if (source !== undefined) {\n this.setSource(source);\n }\n }\n\n StackFrame.prototype = {\n getFunctionName: function () {\n return this.functionName;\n },\n setFunctionName: function (v) {\n this.functionName = String(v);\n },\n\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 // NOTE: Property name may be misleading as it includes the path,\n // but it somewhat mirrors V8's JavaScriptStackTraceApi\n // https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's\n // http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14\n getFileName: function () {\n return this.fileName;\n },\n setFileName: function (v) {\n this.fileName = String(v);\n },\n\n getLineNumber: function () {\n return this.lineNumber;\n },\n setLineNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Line Number must be a Number');\n }\n this.lineNumber = Number(v);\n },\n\n getColumnNumber: function () {\n return this.columnNumber;\n },\n setColumnNumber: function (v) {\n if (!_isNumber(v)) {\n throw new TypeError('Column Number must be a Number');\n }\n this.columnNumber = Number(v);\n },\n\n getSource: function () {\n return this.source;\n },\n setSource: function (v) {\n this.source = String(v);\n },\n\n toString: function() {\n var functionName = this.getFunctionName() || '{anonymous}';\n var args = '(' + (this.getArgs() || []).join(',') + ')';\n var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';\n var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';\n var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';\n return functionName + args + fileName + lineNumber + columnNumber;\n }\n };\n\n return StackFrame;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/error-stack-parser/~/stackframe/stackframe.js\n// module id = 22\n// module chunks = 0","'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 = _.extend(true, {}, 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 = _.extend(true, {}, extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/transforms.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\nfunction checkIgnore(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = _.LEVELS[settings.reportLevel] || 0;\n\n if (levelVal < reportLevel) {\n return false;\n }\n\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nfunction userCheckIgnore(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.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\nfunction urlIsNotBlacklisted(item, settings) {\n return !urlIsOnAList(item, settings, 'blacklist');\n}\n\nfunction urlIsWhitelisted(item, settings) {\n return urlIsOnAList(item, settings, 'whitelist');\n}\n\nfunction urlIsOnAList(item, settings, whiteOrBlack) {\n // whitelist is the default\n var black = false;\n if (whiteOrBlack === 'blacklist') {\n black = true;\n }\n var list, trace, frame, filename, frameLength, url, listLength, urlRegex;\n var i, j;\n\n try {\n list = black ? settings.hostBlackList : settings.hostWhiteList;\n listLength = list && list.length;\n trace = _.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 || listLength === 0) {\n return !black;\n }\n if (!trace || !trace.frames) {\n return !black;\n }\n\n frameLength = trace.frames.length;\n for (i = 0; i < frameLength; i++) {\n frame = trace.frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !black;\n }\n\n for (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 } catch (e)\n /* istanbul ignore next */\n {\n if (black) {\n settings.hostBlackList = null;\n } else {\n settings.hostWhiteList = null;\n }\n var listName = black ? 'hostBlackList' : 'hostWhiteList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !black;\n }\n return false;\n}\n\nfunction messageIsIgnored(item, settings) {\n var exceptionMessage, i, ignoredMessages,\n len, messageIsIgnored, rIgnoredMessage,\n body, traceMessage, bodyMessage;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n body = item.body;\n traceMessage = _.get(body, 'trace.exception.message');\n bodyMessage = _.get(body, 'message.body');\n\n exceptionMessage = traceMessage || bodyMessage;\n\n if (!exceptionMessage){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n messageIsIgnored = rIgnoredMessage.test(exceptionMessage);\n\n if (messageIsIgnored) {\n break;\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 !messageIsIgnored;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlacklisted: urlIsNotBlacklisted,\n urlIsWhitelisted: urlIsWhitelisted,\n messageIsIgnored: messageIsIgnored\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/predicates.js\n// module id = 24\n// module chunks = 0","'use strict';\n\nvar _ = require('../utility');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true\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 Instrumenter(options, telemeter, rollbar, _window, _document) {\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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.telemeter = telemeter;\n this.rollbar = rollbar;\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 };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.extend(true, {}, 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 = _.extend(true, {}, defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n};\n\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\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 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 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 && (xhr.readyState === 1 || xhr.readyState === 4)) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n xhr.__rollbar_event = self.telemeter.captureNetwork(xhr.__rollbar_xhr, 'xhr');\n }\n if (xhr.readyState === 1) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n } else {\n xhr.__rollbar_xhr.end_time_ms = _.now();\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 } catch (e) {\n /* ignore possible exception from xhr.status */\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 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 {\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 self.telemeter.captureNetwork(metadata, 'fetch');\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n return resp;\n });\n };\n }, this.replacements, 'network');\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 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 for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\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 if (this.telemetryScrubber) {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber(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.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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/telemetry.js\n// module id = 25\n// module chunks = 0","'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\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/domUtility.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.umd.min.js b/dist/rollbar.umd.min.js index dcae315db..68247ac08 100644 --- a/dist/rollbar.umd.min.js +++ b/dist/rollbar.umd.min.js @@ -1,2 +1,2 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var r=n(2),o=window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",a=window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if(window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new r(o);window[i]=s}else window.rollbar=r,window._rollbarDidLoad=!0;t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,h,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(f.captureUncaughtExceptions(window,this),f.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&f.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(v.addMessageWithError).addTransform(v.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(v.itemToPayload)}function a(t){t.addPredicate(g.checkIgnore).addPredicate(g.userCheckIgnore).addPredicate(g.urlIsNotBlacklisted).addPredicate(g.urlIsWhitelisted).addPredicate(g.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(6);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function v(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function g(t,e){var n,r;try{n=N.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function y(t){var e,n;try{e=N.parse(t)}catch(t){n=t}return{error:n,value:e}}function b(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function w(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function _(t,e,n,r,o){for(var a,s,u,c,l,p,h=[],d=0,m=t.length;d0&&(u=L(!0,{},u),u.extraArgs=h);var b={message:a,err:s,custom:u,timestamp:O(),callback:c,uuid:f()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function x(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function O(){return Date.now?+Date.now():+new Date}var L=n(7),N={},C=!1;r();var j={debug:0,info:1,warning:2,error:3,critical:4},A={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isIterable:u,isError:c,extend:L,traverse:l,redact:p,uuid4:f,LEVELS:j,sanitizeUrl:h,addParamsAndAccessTokenToPath:m,formatUrl:v,stringify:g,jsonParse:y,makeUnhandledStackInfo:b,createItem:_,get:x,set:k,scrub:E,formatArgsAsString:S,now:O}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,f=!1;for("boolean"==typeof c?(f=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(6),a=n(12),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(6);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(14);var a=n(15),s=n(6);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(",");for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(6),p=n(13);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){v.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(6);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r ",i=o.length,a=[],s=0,u=0;u0&&n>=r));u++)a.push(e),s+=e.length;return a.join(o)}function p(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 n=0;n=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===a(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=f(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=l(c(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=d.parse(this._location.href),r=d.parse(e),o=d.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i}])}); \ No newline at end of file +!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){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var r=n(2),o=window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",a=window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if(window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new r(o);window[i]=s}else window.rollbar=r,window._rollbarDidLoad=!0;t.exports=r},function(t,e,n){"use strict";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,h,d);this.client=e||new u(this.options,n,p,"browser"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(f.captureUncaughtExceptions(window,this),f.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&f.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(g.addMessageWithError).addTransform(g.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(g.itemToPayload)}function a(t){t.addPredicate(v.checkIgnore).addPredicate(v.userCheckIgnore).addPredicate(v.urlIsNotBlacklisted).addPredicate(v.urlIsWhitelisted).addPredicate(v.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e=1&&n>=e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:"maxItems has been hit. Ignoring errors until reset.",extra:{maxItems:n}}},language:"javascript",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(o.platform="browser",o.framework="browser-js",o.notifier.name="rollbar-browser-js"):"server"===t&&(o.framework=e.framework||"node-js",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(6);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;ns)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function y(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var n=e+"//"+t.hostname;return t.port&&(n=n+":"+t.port),t.path&&(n+=t.path),n}function b(t,e){var n,r;try{n=j.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function w(t){var e,n;try{e=j.parse(t)}catch(t){n=t}return{error:n,value:e}}function _(t,e,n,r,o,i,a,s){var u={url:e||"",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function x(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function E(t,e,n,r,o){for(var a,s,u,c,l,p,f=[],h=0,m=t.length;h0&&(u=C(!0,{},u),u.extraArgs=f);var b={message:a,err:s,custom:u,timestamp:L(),callback:c,uuid:d()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function k(t,e){if(t){var n=e.split("."),r=t;try{for(var o=0,i=n.length;o500&&(r=r.substr(0,500)+"...")):"undefined"==typeof r&&(r="undefined"),o.push(r);return o.join(" ")}function L(){return Date.now?+Date.now():+new Date}var C=n(7),j={},A=!1;r();var R={debug:0,info:1,warning:2,error:3,critical:4},D={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isNativeFunction:s,isIterable:l,isError:p,extend:C,traverse:f,redact:h,uuid4:d,LEVELS:R,sanitizeUrl:m,addParamsAndAccessTokenToPath:v,formatUrl:y,stringify:b,jsonParse:w,makeUnhandledStackInfo:_,createItem:E,get:k,set:I,scrub:T,formatArgsAsString:N,now:L}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,f=!1;for("boolean"==typeof c?(f=c,c=arguments[1]||{},l=2):("object"!=typeof c&&"function"!=typeof c||null==c)&&(c={});ln&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture("manual",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture("log",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||"xhr",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture("network",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture("dom",i,"info",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture("navigation",{from:t,to:e},"info",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},r.prototype._captureRollbarItem=function(t){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},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(6),a=n(12),s={hostname:"api.rollbar.com",path:"/api/1",search:null,version:"1",protocol:"https:",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,"/item/","POST"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(s.isType(e.context,"object")){var r=s.stringify(e.context,n);r.error?e.context="Error: could not serialize 'context'":e.context=r.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||"https:",o=t.port||("http:"===r?80:"https:"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+"//"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\/$/.test(t),r=/^\//.test(e);return n&&r?e=e.substring(1):n||r||(e="/"+e),t+e}var s=n(6);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){"use strict";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(14);var a=n(15),s=n(6);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=["memory"],a="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();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){"use strict";function n(t,e,n){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener("unhandledrejection",r)}}function i(t,e,n){if(t){var r,o,i="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(","); +for(r=0;r=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||"ENOTFOUND",n}var l=n(6),p=n(13);t.exports={get:r,post:o}},function(t,e){"use strict";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf("@",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf("/",n),e===-1){if(e=t.indexOf("?",n),e===-1)return e=t.indexOf("#",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(":")[0],r.port=r.host.split(":")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf("#",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split("?");r.pathname=o[0],r.query=o[1],r.search=r.query?"?"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){"use strict";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){g.error("Error while parsing the error object.",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error("No message, stack info, or custom data"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:"$remote_ip"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i="eval"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],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 n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}},e})},function(t,e,n){"use strict";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),t._originalArgs&&(o._originalArgs=t._originalArgs),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,"data.body.telemetry",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r="data.body.trace_chain.0",o=a.get(t,r);if(o||(r="data.body.trace",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+".exception.description",t.message),void n(null,t);var i=a.get(t,r+".extra")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+".extra",s)}n(null,t)}var a=n(6);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){"use strict";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))n="[scrubbed]";else if(this.telemetryScrubber){var o=u.describeElement(e);this.telemetryScrubber(o)&&(n="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,"navigation")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),r(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},i.prototype.handleUrlChange=function(t,e){var n=s.parse(this._location.href),r=s.parse(e),o=s.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||"")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},i.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;r(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),r(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i},function(t,e){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o ",i=o.length,a=[],u=0,c=t.length-1;c>=0;c--){if(e=s(t[c]),n=u+a.length*i+e.length,c=r+3){a.unshift("...");break}a.unshift(e),u+=e.length}return a.join(o)}function s(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 n=0;n diff --git a/examples/snippet.html b/examples/snippet.html index 806ad9b0c..86e682173 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index bb72f0293..b608c3908 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index 120e34263..c0fa547ed 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@